I have an inquire about the RNG in R It is known that when we use the " rnorm " function , we pass the arguments : 1- number of variables to be generated 2- mean vector of the normal random errors. 3- standard deviation vector of the normal random errors. my question is the following Is the a way (a function) in R that we could specify the covariance matrix in step 3, instead of the standard deviation vector of the normal random errors, since we want to generate multivariate correlated random data. many thanks A. mami -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Date: Tue, 28 Nov 2000 14:23:46 +0000 > From: AHMED MAMI <amami at ma.man.ac.uk> > > I have an inquire about the RNG in R(I don't think so: this is nothing to do with the `random number generator'.)> It is known that when we use the " rnorm " function , we pass the > arguments : > > 1- number of variables to be generated > 2- mean vector of the normal random errors. > 3- standard deviation vector of the normal random errors. > > my question is the following > > Is the a way (a function) in R that we could specify the covariance > matrix in step 3, instead of the > > standard deviation vector of the normal random errors, since we want to > generate multivariate > > correlated random data.Perhpas, you do, but you don't use rnorm for that. Try mvrnorm in package MASS. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Look for mvrnorm() in the MASS library. On Tue, 28 Nov 2000, AHMED MAMI wrote:> I have an inquire about the RNG in R > > It is known that when we use the " rnorm " function , we pass the > arguments : > > 1- number of variables to be generated > 2- mean vector of the normal random errors. > 3- standard deviation vector of the normal random errors. > > my question is the following > > Is the a way (a function) in R that we could specify the covariance > matrix in step 3, instead of the > > standard deviation vector of the normal random errors, since we want to > generate multivariate > > correlated random data. > > many thanks > > > A. mami > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, Is there a "R" function that uses the Gauss-Newton method to minimize a nonlinear regression model. I mean in the same manner as the "nlsfit" Splus function, where you can specify the model and the derivatives. regards ahmed. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
AHMED MAMI wrote:> > Hi, > > Is there a "R" function that uses the Gauss-Newton method to minimize a > nonlinear regression > > model. I mean in the same manner as the "nlsfit" Splus function, where you can > specify the model and the > > derivatives.Hmm. In my version of S-Plus (4.5), there is no function nlsfit() available. You might want to take a look in the package "nls". Uwe Ligges -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._