Sampler derived using the eigendecomposition of the covariance
matrix Sigma
. The function uses the Armadillo random normal generator
Examples
mvrnorm(n=10, mu=c(0,2), Sigma=diag(2))
#> [,1] [,2]
#> [1,] 0.4882522 2.9154757
#> [2,] -1.3397256 3.6705300
#> [3,] -0.4402110 3.7359878
#> [4,] -1.0323680 2.2615054
#> [5,] 0.8875935 0.9728781
#> [6,] -1.7057297 2.1672866
#> [7,] -0.9111461 1.4518746
#> [8,] 1.5760637 1.3225222
#> [9,] -1.7345188 1.8096213
#> [10,] -0.1732593 2.3724542