Re: [R] help about random generation of a Normal distribution of

2008-07-06 Thread Ted Harding
/bill.venables/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peng Jiang Sent: Sunday, 6 July 2008 1:47 PM To: Arnau Mir Torres Cc: r-help@r-project.org Subject: Re: [R] help about random generation of a Normal distribution ofseveral variables Hi

[R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Arnau Mir
Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix: matrix(c(2,1,1,3),2,2). Thanks in advance, Arnau.

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Peng Jiang
Hi, Arnau, mvrnorm() in MASS library is what you need. ? mvrnorm to see the detail but first you need to load the MASS library, i.e,library(MASS) regards/ On 2008-7-6, at 上午12:21, Arnau Mir wrote: Hello. Somebody knows how can I generate a set of n random vectors of a normal

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Gavin Simpson
On Sat, 2008-07-05 at 18:21 +0200, Arnau Mir wrote: Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix:

Re: [R] help about random generation of a Normal distribution of

2008-07-05 Thread Ted Harding
There is no need to load the MASS library, since the code for mvrnorm therein is compact and self-contained: mvrnorm - function (n=1, mu, Sigma, tol=1e-06, empirical=FALSE) { p - length(mu) if(!all(dim(Sigma) == c(p, p))) stop(incompatible arguments) eS - eigen(Sigma, symmetric =

[R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Arnau Mir Torres
Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution of several variables? For example, I want to generate n=100 random vectors of two dimensions for a normal with mean c(0,1) and variance matrix: matrix(c(2,1,1,3),2,2). Thanks in advance,

Re: [R] help about random generation of a Normal distribution of several variables

2008-07-05 Thread Peng Jiang
Hi , Arnau Did you ever check your mailbox? your question was answered last night Beijing time. :) Just read the following . - There is no need to load the MASS library, since the code for mvrnorm therein is compact and self-contained: mvrnorm - function (n=1, mu,

Re: [R] help about random generation of a Normal distribution ofseveral variables

2008-07-05 Thread Bill.Venables
] [mailto:[EMAIL PROTECTED] On Behalf Of Arnau Mir Torres Sent: Sunday, 6 July 2008 2:14 AM To: r-help@r-project.org Subject: [R] help about random generation of a Normal distribution ofseveral variables Hello. Somebody knows how can I generate a set of n random vectors of a normal distribution

Re: [R] help about random generation of a Normal distribution ofseveral variables

2008-07-05 Thread Bill.Venables
Venables CSIRO Laboratories AUSTRALIA http://www.cmis.csiro.au/bill.venables/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peng Jiang Sent: Sunday, 6 July 2008 1:47 PM To: Arnau Mir Torres Cc: r-help@r-project.org Subject: Re: [R] help about random