Next: standardize() Up: Multivariate Macros Help File Previous: probsquad()   Contents

rmvnorm()

Usage:
rmvnorm(n , p), integers n > 0, p > 1
rmvnorm(n, sigma), REAL positive definite symmetric matrix sigma,
  nrows(sigma) > 1
rmvnorm(n, p or sigma, mu), REAL row or column vector mu with length(mu)
  = p or ncols(sigma)



Keywords: random numbers
rmvnorm(n, p), where n > 0 and p > 0 are integer scalars, returns an n
by p matrix whose rows are a random sample from the standard
multivariate normal distribution MVN(0, I_p), where I_p is the p by p
identity matrix.

rmvnorm(n, p, mu) where mu is a REAL row or column vector of length p
does the same, except the rows of the result are MVN(mu, I_p).

rmvnorm(n, sigma [,mu]), where sigma is a positive definite p by p
symmetric matrix with p > 1, does the same, except the rows of the
result are MVN(0, sigma) or MVN(mu, sigma).

When p = 1, use mu + sd*rnorm(n) or mu + sd*rmvnorm(n,1) to generate a
normal sample with mean mu and standard deviation sd.

See also rnorm().


Gary Oehlert 2003-01-15