sim_matgaussian | R Documentation |
This function samples one matrix gaussian matrix.
sim_matgaussian(mat_mean, mat_scale_u, mat_scale_v, u_prec)
mat_mean |
Mean matrix |
mat_scale_u |
First scale matrix |
mat_scale_v |
Second scale matrix |
u_prec |
If |
Consider n x k matrix Y_1, \ldots, Y_n \sim MN(M, U, V)
where M is n x k, U is n x n, and V is k x k.
Lower triangular Cholesky decomposition: U = P P^T
and V = L L^T
Standard normal generation: s x m matrix Z_i = [z_{ij} \sim N(0, 1)]
in row-wise direction.
Y_i = M + P Z_i L^T
This function only generates one matrix, i.e. Y_1
.
One n x k matrix following MN distribution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.