Description Usage Arguments Details Value Examples
Generate draws from a multivariate normal distribution
1 | mvrnorm(n, mu, Sigma)
|
n |
Number of samples. |
mu |
Mean vector. |
Sigma |
Covariance matrix. |
This is essentially a stripped-down version of the mvrnorm function from the MASS library in R. Through the magic of Rcpp we're transforming the same standard normal draws as the R version. However, since Armadillo follows a different convention from R in its definition of the eign-decomposition, the output of this function will *not* be the same as that of its R counterpart. Since we access R's function for generating normal draws, we can set the seed from R.
Matrix of draws from the normal distribution: each row is a draw.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.