| rmvnorm.const | R Documentation |
Fast ways to draw multivariate normals with linear constrains when the variance or precision matrix is sparse.
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, ...)
n |
number of observations. |
mu |
mean vector. |
Sigma |
covariance matrix of class |
Q |
precision matrix. |
b |
vector determining the mean. |
Rstruct |
the Cholesky structure of |
A |
Constrain matrix. |
a |
Constrain vector. |
U |
see below. |
... |
arguments passed to |
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).
Reinhard Furrer
See references in chol.
rmvnorm.spam.
# to be filled in
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.