rmvn | R Documentation |
A shim of mvrnorm
to return matrix when n < 2.
rmvn(n = 1L, mu, Sigma, ...)
n |
number of random vectors desired (nonnegative integer, can be 0). |
mu |
mean vector. |
Sigma |
variance-covariance matrix. |
... |
other arguments passed to |
A matrix with n
rows and length(mu)
columns.
Peter Solymos
mvrnorm
rmvn(0, c(a=0, b=0), diag(1, 2, 2))
rmvn(1, c(a=0, b=0), diag(1, 2, 2))
rmvn(2, c(a=0, b=0), diag(1, 2, 2))
sapply(0:10, function(n) dim(rmvn(n, c(a=0, b=0), diag(1, 2, 2))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.