Draw Constrainted Multivariate Normals
rmvnorm.const.RdFast ways to draw multivariate normals with linear constrains when the variance or precision matrix is sparse.
Usage
rmvnorm.const(n, mu = rep.int(0, dim(Sigma)[1]), Sigma, Rstruct = NULL,
A = array(1, c(1,dim(Sigma)[1])), a=0, U=NULL, ...)
rmvnorm.prec.const(n, mu = rep.int(0, dim(Q)[1]), Q, Rstruct = NULL,
A = array(1, c(1,dim(Q)[1])), a=0, U=NULL, ...)
rmvnorm.canonical.const(n, b, Q, Rstruct = NULL,
A = array(1, c(1,dim(Q)[1])), a=0, U=NULL, ...)Details
The functions rmvnorm.prec and rmvnorm.canonical
do not requrie sparse precision matrices.
For rmvnorm.spam, the differences between regular and sparse
covariance matrices are too significant to be implemented here.
Often (e.g., in a Gibbs sampler setting), the sparsity structure of
the covariance/precision does not change. In such setting, the
Cholesky factor can be passed via Rstruct in which only updates
are performed (i.e., update.spam.chol.NgPeyton instead of a
full chol).
References
See references in chol.