rmvnorm {oeli} | R Documentation |
Draw from multivariate normal distribution
Description
This function draws from a multivariate normal distribution.
Usage
rmvnorm(n = 1, mean, Sigma, log = FALSE)
Arguments
n |
An |
mean |
A |
Sigma |
A |
log |
A |
Value
If n = 1
a vector
of length p
, else
a matrix
of dimension n
times p
with samples as rows.
Examples
mean <- c(0, 0)
Sigma <- diag(2)
rmvnorm(n = 3, mean = mean, Sigma = Sigma)
rmvnorm(mean = mean, Sigma = Sigma, log = TRUE)
[Package oeli version 0.5.2 Index]