As mentioned by somebody before, there is no problem for the normal case - use mvrnorm function from MASS package with any mu and make Sigma be any diagonal matrix (with strictly positive diagonal). Note that even though all the correlations are 0, the SAMPLE correlations won't be 0. If you want to create a set of vectors whose SAMPLE correlations are 0 you will have to use a variant of Gramm-Schmidt. I do not know whether a variant of mvrnorm exists for logistic distribution (my guess is that it does not).
--- On Tue, 7/7/09, Stein, Luba (AIM SE) <luba.st...@allianz.com> wrote: > From: Stein, Luba (AIM SE) <luba.st...@allianz.com> > Subject: [R] Uncorrelated random vectors > To: "r-help@r-project.org" <r-help@r-project.org> > Received: Tuesday, 7 July, 2009, 11:45 PM > Hello, > > is it possible to create two uncorrelated random vectors > for a given distribution. > > In fact, I would like to have something like the function > "rnorm" or "rlogis" with the extra property that they are > uncorrelated. > > Thanks for your help, > Luba > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org > mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, > reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.