View source: R/generate-process.R
sim_mniw | R Documentation |
This function samples normal inverse-wishart matrices.
sim_mniw(num_sim, mat_mean, mat_scale_u, mat_scale, shape, u_prec = FALSE)
num_sim |
Number to generate |
mat_mean |
Mean matrix of MN |
mat_scale_u |
First scale matrix of MN |
mat_scale |
Scale matrix of IW |
shape |
Shape of IW |
u_prec |
If |
Consider (Y_i, \Sigma_i) \sim MIW(M, U, \Psi, \nu)
.
Generate upper triangular factor of \Sigma_i = C_i C_i^T
in the upper triangular Bartlett decomposition.
Standard normal generation: n x k matrix Z_i = [z_{ij} \sim N(0, 1)]
in row-wise direction.
Lower triangular Cholesky decomposition: U = P P^T
A_i = M + P Z_i C_i^T
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.