Bill, while your point is a fair one, as far as it goes,
I (and no doubt others) often run R on low-powered hardware,
and therefore like to restrict overload. MASS is quite a big
package.
I've no dispute with your statement that MASS is both recommended
and universally available. And it is valuabl
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, Si
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
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 =
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 mat
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
distribu
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.
_
7 matches
Mail list logo