powered by
Random generation for the multivariate normal distribution. $$X \sim N_p(\mu, \Sigma)$$
rmvnorm(n = 1, mu = rep(0, p), sigma = diag(p))
number of samples.
mean
covariance matrix.
a \(n\times p\) matrix with samples in its rows.
# NOT RUN { CVarE:::rmvnorm(20, sigma = matrix(c(2, 1, 1, 2), 2)) CVarE:::rmvnorm(20, mu = c(3, -1, 2)) # }
Run the code above in your browser using DataLab