To whom it may concern, I try to simulate a non-normal multivariate distribution. The MASS package allows by mean of "mvrnorm" command to perform a multivariate normal simulation. Is there an equivalent command for an arbitrary multivariate distribution available in the R-language? Thank you in advance. Bernard Colin Colin Bernard Professeur titulaire D?partement de Math?matiques et d'Informatique Facult? des Sciences Universit? de Sherbrooke SHERBROOKE J1K-2R1 (Qu?bec) Canada Tel : (819)821-8000 poste 2012 Fax :(819)821-8200 e-mail : bernard.colin at dmi.usherb.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 23 Jan 2002, Bernard Colin wrote:> To whom it may concern, > > I try to simulate a non-normal multivariate distribution. The MASS package > allows by mean of "mvrnorm" command to perform a multivariate normal > simulation. Is there an equivalent command for an arbitrary multivariate > distribution available in the R-language?There is no equivalent command to sample from an arbitary *univariate* distribution either! There are no general algorithmic methods even in the univariate case, although inversion comes closest. -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 23 Jan 2002, Bernard Colin wrote:> To whom it may concern, > > I try to simulate a non-normal multivariate distribution. The MASS package > allows by mean of "mvrnorm" command to perform a multivariate normal > simulation. Is there an equivalent command for an arbitrary multivariate > distribution available in the R-language? >No. An `arbitrary multivariate distribution' covers a whole lot of possibilities. It would be fairly easy to write a function that linearly transformed an arbitrary starting distribution to have arbitrary mean and variance in the same way that mvrnorm() does, but that is usually not desirable. It is unusual (? unique) to the Normal that this procedure produces a random vector that is marginally and conditionally Normal. An analogous mvrgamma would produce variables that are not Gamma distributed and an mvrpois wouldn't even produce integers. There are many other ways of producing multivariate versions of univariate distributions and most of them are `natural' for only a few cases. If you could be more specific about what you want someone might be able to help, but most of these methods aren't programmed in R. Jim Lindsey's packages have a few. -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 All, If I have a factor f: A B C B C A C B A A B .... and I would like to generate a factor to indicate the trial number as a function of condition: e.g. 1 1 1 2 2 2 3 3 3 4 4 ... how might I attack this in R? thanks, Brad Buchsbaum -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brad Buchsbaum wrote:> > Hi All, > > If I have a factor f: > > A B C B C A C B A A B .... > > and I would like to generate a factor to indicate the trial number > as a function of condition: e.g. > > 1 1 1 2 2 2 3 3 3 4 4 ... > > how might I attack this in R?What about something like as.factor(outer(rep(1, 3), 1:4)) Uwe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wednesday 23 January 2002 02:11 pm, Uwe Ligges wrote:> Brad Buchsbaum wrote: > > Hi All, > > > > If I have a factor f: > > > > A B C B C A C B A A B .... > > > > and I would like to generate a factor to indicate the trial number > > as a function of condition: e.g. > > > > 1 1 1 2 2 2 3 3 3 4 4 ... > > > > how might I attack this in R? > > What about something like > as.factor(outer(rep(1, 3), 1:4)) > > UweI should have mentioned that the condtions A, B, C vary randomly, so I have to perform some operation on the existing factor "f". Brad B. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
When you say that a distribution is normal, you can tell very specific properties, but when you say thatis "not normal" there is an infinite range of possibilities (just as when you say that a function is non-linear...). You must investigate your data and come up with some alternative distributions that you can test as alternative hypothesis. Perhaps the book Hilborn and Mangel 1997 The ecological detective, confronting models with data (princeon Univ. Press) might be useful for you. Agus Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo at ija.csic.es On Wed, 23 Jan 2002, Bernard Colin wrote:> To whom it may concern, > > I try to simulate a non-normal multivariate distribution. The MASS package > allows by mean of "mvrnorm" command to perform a multivariate normal > simulation. Is there an equivalent command for an arbitrary multivariate > distribution available in the R-language? > > Thank you in advance. > > Bernard Colin > > > Colin Bernard > Professeur titulaire > Département de Mathématiques et d'Informatique > Faculté des Sciences > Université de Sherbrooke > SHERBROOKE J1K-2R1 (Québec) > Canada > Tel : (819)821-8000 poste 2012 > Fax :(819)821-8200 > e-mail : bernard.colin at dmi.usherb.ca > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Simulation from a multivariate normal distribution
- Multivariate simulation
- better example for multivariate data simulation question-please help if you can
- Simulating from a Multivariate Normal Distribution Using a Correlation Matrix
- Multivariate Normal and loops