rmvn {bSims} | R Documentation |
Multivariate normal distribution
Description
A shim of mvrnorm
to return matrix when n < 2.
Usage
rmvn(n = 1L, mu, Sigma, ...)
Arguments
n |
number of random vectors desired (nonnegative integer, can be 0). |
mu |
mean vector. |
Sigma |
variance-covariance matrix. |
... |
other arguments passed to |
Value
A matrix with n
rows and length(mu)
columns.
Author(s)
Peter Solymos
See Also
Examples
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))))
[Package bSims version 0.3-2 Index]