| cvPost {RxODE} | R Documentation |
Note this Inverse wishart rescaled to match the original scale of the covariance matrix.
cvPost(nu, omega, n = 1L, omegaIsChol = FALSE, returnChol = FALSE)
nu |
Degrees of Freedom (Number of Observations) for covariance matrix simulation. |
omega |
Estimate of Covariance matrix. |
n |
Number of Matrices to sample. By default this is 1. |
omegaIsChol |
is an indicator of if the omega matrix is in the Cholesky decomposition. |
returnChol |
Return the Cholesky decomposition of the covariance matrix sample. |
If your covariance matrix is a 1x1 matrix, this uses an scaled inverse chi-squared which is equivalent to the Inverse Wishart distribution in the uni-directional case.
a matrix (n=1) or a list of matrices (n > 1)
Matthew L.Fidler & Wenping Wang
## Sample a single covariance. draw1 <- cvPost(3, matrix(c(1,.3,.3,1),2,2)) ## Sample 3 covariances set.seed(42) draw3 <- cvPost(3, matrix(c(1,.3,.3,1),2,2), n=3) ## Sample 3 covariances, but return the cholesky decomposition set.seed(42) draw3c <- cvPost(3, matrix(c(1,.3,.3,1),2,2), n=3, returnChol=TRUE)