sim_mnormal {bvhar} | R Documentation |
Generate Multivariate Normal Random Vector
Description
This function samples n x muti-dimensional normal random matrix.
Usage
sim_mnormal(
num_sim,
mu = rep(0, 5),
sig = diag(5),
method = c("eigen", "chol")
)
Arguments
num_sim |
Number to generate process |
mu |
Mean vector |
sig |
Variance matrix |
method |
Method to compute |
Details
Consider x_1, \ldots, x_n \sim N_m (\mu, \Sigma)
.
Lower triangular Cholesky decomposition:
\Sigma = L L^T
Standard normal generation:
Z_{i1}, Z_{in} \stackrel{iid}{\sim} N(0, 1)
-
Z_i = (Z_{i1}, \ldots, Z_{in})^T
-
X_i = L Z_i + \mu
Value
T x k matrix
[Package bvhar version 2.0.1 Index]