powered by
Simulates from a multivariate normal distribution
rmnorm(n = 1, mean = rep(0, d), varcov)
matrix of n rows of random vectors
number of random numbers to be generated
numeric vector giving the mean of the distribution
a positive definite matrix representing the variance-covariance matrix of the distribution
Jim Albert
mu <- c(1,12,2) Sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3) x <- rmnorm(10, mu, Sigma)
Run the code above in your browser using DataLab