[R] Interpolate a matrix z=f(x,y)
Hi all, I want to interpolate a matrix as function of its row and column coordinates, i.e. {u,v,w}=spline2d(x,y,z...) Where u & v are the new coordinates values and w the matrix extrapolated Best regards Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Snow package --> Results
First, many thanks to Simon Urbanek for his help. A simulation case (50x34x5x3 & 250 replications) each based on behavior of 2500 consumers takes - 2h20mins on a laptop (2 MHz, 1Go, WinXp) - 1h on a G5 bi-proc (2.5 Mhz, 2Go) A loop was used for the laptop, the same loop was transposed as function for the Mac Best regards Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Distributional characteristics
Hi all I've a continuous variable and I want to test (graphically, plotting observed and theoretical distr, qqplot) whether it follows some formal distribution. (some thing close to Ricci document : Fitting distributions with R, Feb05). The distribution I want to fit is a truncated Gamma at 1 (the minimal value is 1), P(x)=Pgamma(rate,x)/(1-Pgamma(rate,x<1)) NB : changing the variable (x-1,ln(x)) didn't get satisfying results Best Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Pb encountered with demos
Hi all, I've just installed R on my Mac & PC. The base demo run fine.. But I'm encountering several pb with some packages (installed using CRAN binaries using the menu) - Lattice: > demo(lattice,package='lattice') demo(lattice) ~~~ Type to start : > require(grid) [1] TRUE > old.prompt <- grid.prompt(TRUE) > old.settings <- trellis.par.get() Erreur dans eval.with.vis(expr, envir, enclos) : impossible de trouver la fonction "trellis.par.get" - Zelig > demo(poisson,package='Zelig') demo(poisson) ~~~ Type to start : > data(sanction) > user.prompt() Erreur dans eval.with.vis(expr, envir, enclos) : impossible de trouver la fonction "user.prompt" De plus : Warning message: data set 'sanction' not found in: data(sanction) Is there something wrong in the settings? Thanks helping me to fix this Naji Mac platform powerpc-apple-darwin7.9.0 arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major2 minor2.0 year 2005 month10 day 06 svn rev 35749 language R PC platform i386-pc-mingw32 arch i386 os mingw32 system i386,mingw32 status major2 minor2.0 year 2005 month10 day 06 svn rev 35749 language R __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] changing memory limits to speed up lsoda
Martin, For my simulations (same hardware with less memory). - Optimize the code : using Narray, avoiding loops - Installed distributed computations (PVM & RPVM tools are very easy to use, many thanks to Simon Urbanek for his help) Hope this will help Best Naji Le 26/10/05 16:43, « Martin Henry H. Stevens » <[EMAIL PROTECTED]> a écrit : > Hi All, > I am running R 2.2.0 on Mac OS 10.4.2, dual G5 processors with 8 Gig > RAM. > I am running a simulation with lsoda that requires ~378 s to complete > one set of time intervals. I need to optimize the parameters, and so > need to considerably speed up the simulation. > I have tried to figure out how to change the appropriate memory > allocation and have search R help and Introductory information and > the archives, but connot figure out how to allocate more to the right > place. > I would greatly appreciate any pointers or tips or leads. > Thank you, > Hank Stevens > > > Dr. Martin Henry H. Stevens, Assistant Professor > 338 Pearson Hall > Botany Department > Miami University > Oxford, OH 45056 > > Office: (513) 529-4206 > Lab: (513) 529-4262 > FAX: (513) 529-4243 > http://www.cas.muohio.edu/~stevenmh/ > http://www.muohio.edu/ecology/ > http://www.muohio.edu/botany/ > "E Pluribus Unum" > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Hybrid Monte Carlo algorithm (MCMC)
Hi all, I'm trying to estimate a nested model (purchase decision, cloglog formula, & quantity bought given a purchase, truncated Poisson). Some of the parameters are mixed (6) and 4 are fixed for all the respondent. The simulated ML (500 simulations) method forwards highly correlated estimates. After some research, Hybrid Monte Carlo seems to be a good alternative to estimate the model. I found neither article nor reference in order to establish some code. I would appreciate a good reference describing the algorithm in detail or some code. Other ideas performing the model estimation are welcome. I have established the log-likelihood function and its gradient. Best regards Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] A comment about R:
Hi all, Roger thanks for the reproduction. As a user of Stata & R, for common analysis I do use Stata and often, I have to adapt some computations or to do some complex hierarchical modeling and then I switch to R. For me switching from Stata (or other statistical software, SO) to R (or other statistical language) requests a double effort: - Programming (laziness?) : writing and testing the code; considering the data as N array or any data frame in order to optimize performance - Statistical testing : I test the model over a simulated data set and validate that the statistical process is giving me back the adequate parameter estimates. An additional step one doesn't need when using an established SO. For me using Stata (or any other SO), has the advantage of using a high quality code written & tested by an organization & their clients. Getting back to Roger replication, I find such replication very useful. Test whether the R-code is giving back adequate results. So it's a very good starting point before adapting the R-code to one's needs. Stata advantage : one can download additional ado files ('package' like) and with the permission of the author, adapt them or translate them into R-code. Not only R &Stata are good products, they also show a valuable asset : the users community Happy new year Le 5/01/06 10:46, « Robert Chung » <[EMAIL PROTECTED]> a écrit : > Roger Bivand wrote: >> Gabor Grothendieck wrote: >> >>> For example, consider this introductory session in Stata: >>> http://www.stata.com/capabilities/session.html >>> >> Could I ask for comments on: >> source(url("http://spatial.nhh.no/R/etc/capabilities.R";), echo=TRUE) >> as a reproduction of the Stata capabilities session? > > Roger, I think your reproduction of the Stata session is excellent. > > However, in a deeper sense, perhaps it's *too* faithful a replication. I > don't normally do analyses exactly the same way in R and in Stata, so > although it's possible to contort R into producing Stata-like output, why > would anyone want to? For example, in the sample Stata session, they run a > t-test before plotting any data. In R, I'd tend to plot early and test > hypotheses after. Rather that print out the top and bottom 5 mileage cars, > I might plot(weight,mpg,col=as.integer(foreign)) and identify() the > bivariate oddities. Rather than start into linear models, I might do some > lowess() lines. I'd probably do a splom() pretty early. Depending on what > I was doing, maybe I'd do something like > stars(auto[,-c(1,12)],labels=make). > > Stata and R are both fine products, but I sometimes wonder how the tools > one chooses affect the analyses one does. > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] A comment about R -> Link to a technical report from ATS, UCLA
Hi all, UCLA ATS Statistical Consulting Group has just launched a very interesting paper comparing SPSS, SAS & Stata as Statistical Packages.. "Perhaps the most notable exception to this discussion is R" http://www.ats.ucla.edu/stat/technicalreports/ It's an interesting reading for this thread. Best regards Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Contout plot options
Hi all As a new user of R, I need some help for a contour plot.. - How can I change x,y labels format ie .01 -> 1% - Is is possible to change Axis & Grph fonts to Times 11? - How can I change the xaxp? I gave it several trials without success.. Par(xaxp(0,1,4) Contour(x,y,z,label=c("2%","4%","6%","8%","10%","12%","14%","16%","18%")) Title("Isoquant Market share", xlab="Availability",ylab="Share of Prefeences") Thanks for help -> Is there any tutorial for R graphs? Best regards Naji __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Approximate a f(x,y)
Hi all, Running simulations, I'm generating market response to 2 factors X&Y.. There is no closed form for the market response.. The results are store in a matrix Z(X <- seq(.02,.98,.02), Y <- seq(.01,.19,.01)).. For optmization purpose I need to approximate the values for any factor X in 0,02-0,98 and Y in 0,01-0,19 How can I do it ? For one factor : Xn-1 < x <= Xn f(x)=(f(Xn-1)*(x-Xn-1)+f(Xn)*(Xn-x))/(Xn-Xn-1) I don't know how to generalize this for two factors.. Thanks in Advance Naji __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R COCOA- Mac users
Hi all, I've downloaded http://cran.cict.fr/bin/macosx/R-2.0.1.dmg Installed all the packages (except Aqua) (no error message occured) In my application folder, I find R only and I'm having the following message when processing R : Error in rm(rlibs) : can't remove variables from base namespace R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0 Is it possible to forward a check list in order to get R Cocoa Gui running? Best wishes for the new year Naji __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re :Off topic -- large data sets. Was RE: [R] 64 Bit R Background Question
Hi, Also I agree those cases are relatively rare in STATISTICAL analysis, you can encounter them for simulation topics (natural catalysm a 5 meter in the topographics can change all the simulations) Two ideas (in addition to loading several sections) is 1- to search for duplicate cases and estimate your model upon a frequency weighted shema, perhaps you don't have 200millions different 'cases' 2- take into account your data and model the used algorythm precision/accuracy, (i.e. No need to take into account 1million case, a precision close to .001, if the gradient, or any other function used, has a .01 accuracy) ... Best regards Naji Le 14/02/05 18:41, « Berton Gunter » <[EMAIL PROTECTED]> a écrit : > >>> read all 200 million rows a pipe dream no matter what >> platform I'm using? >> >> In principle R can handle this with enough memory. However, >> 200 million >> rows and three columns is 4.8Gb of storage, and R usually needs a few >> times the size of the data for working space. >> >> You would likely be better off not reading the whole data set >> at once, but >> loading sections of it from Oracle as needed. >> >> >> -thomas >> > > Thomas's comment raises a question: > > Can comeone give me an example (perhaps in a private response, since I'm off > topic here) where one actually needs all cases in a large data set ("large" > being > 1e6, say) to do a STATISTICAL analysis? By "statistical" I exclude, > say searching for some particular characteristic like an adverse event in a > medical or customer repair database, etc. Maybe a definition of > "statistical" is: anything that cannot be routinely done in a single pass > database query. > > The reason I ask this is that it seems to me that with millions of cases, > (careful, perhaps stratified or in some other not completely at random way) > sampling should always suffice to reduce a dataset to manageable size > sufficient for the data analysis needs at hand. But my ignorance and naivete > probably show here. > > Thanks. > > -- Bert > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R, MacOSX G5 bi-proc
Hi all, I've downloaded binary files from CRAN to install R and it's working quite fine..I'm wandering if I can take advantage of two processors from the Mac. Where can I find lecture/help for this? Thanks in advance Naji __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re : [R] Fitting a mixed negative binomial model
Ben Dave & all, I'm a user of ADModel (product of Otter Research) Just a word to say that for maximisation, I always rely on Admodel. It's really fast (amazing when you have an important number of parameters), can be used either as a standalone application or as DLL I do use GAUSS (Aptech), R & Stata for my research.. For optimization, this product deserves your attention.. I'm not aware of ADMB-RE so can tell nothing about it Best regards Naji Nassar Le 13/04/05 21:05, « dave fournier » <[EMAIL PROTECTED]> a écrit : > >> I *think* (but am not sure) that these guys were actually (politely) >> advertising a commercial package that they're developing. But, > looking >at >> the web page, it seems that this module may be freely available -- >can't >> tell at the moment. > >>Ben > > > The Software for negative binomial mixed models will be > free ie free as in you can use it without paying anything. > It is built using our > proprietary software. The idea is to show how our software > is good for building nonlinear statstical models including > those with random effects. Turning our stand alone software > into somethng that can be called easily from r has been a > bit of a steep learning curve for me, but we are making progress. > So far we have looked at 3 models. The model in Booth et al. (easy). > An overdispersed data set that turned out probably be > a zero inflated poisson (faily easy but the negative binomial > is only fit to be rejected for the simpler model) and > what appears to be a true negative binomial (difficult but > doable) and we are discussing the form of the model with the > person who wishes to analyze it. > > A few more data sets would be useful if anyone has > an application so that we can ensure the robustness of our > software. > > Dave > > > > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re : Thanks! (Was: Re: [R] R-2.1.0 is released)
Some thoughts: * As it's free (no guarantee) and 'matrix oriented' (all the details can be accessed), R user has (sic) better control of what he's doing. In my opinion, R is a better learning tool than others * No doubt that the intangible asset of R is the R users and their commitment to share help, advices, code. In 15 years, I saw some software declining because they never succeeded activating their user community.. * For researchers, sharing code catalyze citations. For example, as I'm modeling consumer choice in FMCG, I'm likely to use MNP package in R and then cite Kosuke Imai rather than developing any specific code. On the other side, for professional issues, companies need commitment from a third party in order to get the adequate support ASAP (SAS, SPSS..). Don't forget that universities have to train their students with the softwares companies are using. As a researcher (R user) and practitioner (R+others), I'd hire - first one who control R AND the software used in the company - second choice : one who control software used in the company rather than R Best regrds Naji Le 20/04/05 19:43, « Spencer Graves » <[EMAIL PROTECTED]> a écrit : > Permit me to echo Bjørn-Helge Mevik's thanks. > > I've been telling people that R is rapidly becoming the platform > of choice for new statistical algorithm development for many reasons. > > * First, it gives someone almost instant access to many of the > leading international experts in statistical computing. This includes > free access to some of the best code available for almost any > statistical application. > > * Second, it provides new algorithm developers with an easy way to > solicit feedback on their code from many others, including not only the > recognized experts in statistical computing but many others who know a > lot but may not be as well known. > > * Third, distributing an R package is a type of publication. It > may not count in the peer review process, but it might reach more people > and build one's reputation faster than a standard publication. Also, I > wonder how this impacts how easy it might be to get something published > in a more traditional way? > > At a conference recently, someone claimed that universities are > dumping SAS, SPSS, Minitab, etc., for R because R is free and the > alternatives are not. I don't know the extent to which this is true, > but I can see another reason for doing this: It's incredibly easy for > instructors to share their latest code with their students. > > Does anyone have any thoughts on this? > > Comments? > Best Wishes, > Spencer Graves > > Bjørn-Helge Mevik wrote: > >> I'd like to thank the developers in the Core Team for their great >> work! R has become an invaluable and indispensible tool for (at least) >> me, much thanks to the hard and good work of the Core Team. >> >> >> > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re : Re : Thanks! (Was: Re: [R] R-2.1.0 is released)
Pr. Ripley >> Don't forget that universities have to train their students with the >> softwares companies are using. Right 'have' is abusive Companies want to keep a certain continuity in their service/product. There's a kind of inertia switching from their core software (SAS, MATLAB or other) to any other software. And therefore, universities won't completely leave trainings using those softwares (push and indirect pull 'marketing' efforts from software companies and companies (recruiters)). For the ST/MT, universities won't dump some leading statistical softwares. I hope more and more universities will teach statistics using R or equivalent (if it exists). They will 'produce' people more likely - to know what they are processing (they have to understand the underlying algorithm, weakness and strength) - to adopt the best approach (versus the one implemented or to wait until the approach is implemented) And as R is 'free', there is no discrimination or financial barrier. My wish is to see a clear distinction between 'learning statistics' ( a must) and 'using commercial software' (optional). I agree with your point of view that the latest is not the university objective (still the question about preparing for the labor market, which is another debate). Best regards Naji Le 21/04/05 7:19, « Prof Brian Ripley » <[EMAIL PROTECTED]> a écrit : > On Wed, 20 Apr 2005, Naji wrote: > >> Don't forget that universities have to train their students with the >> softwares companies are using. Right 'have' is abusive > > Not so. But companies have to hire the people universities teach (or > non-graduates if they can find them and train those). As a result > software companies give universities very good deals, even in some cases > including hardware, to use their software. > > Our goal is to teach people things useful for the next decade, not what is > implemented in current software, commercial or otherwise. R has benefited > enormously from parts developed in meeting that goal. R has more than 400 packages (R 2.01 MacOSX3.9, CRAN list); if one can't find exactly what he wants, he'll get at least a excellent starting point __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html