Computes means and Cholesky factors of covariance or precision matrices of multiple multivariate normal distributions.
marg_mvnorm(chol, invchol, which = 1L)
cond_mvnorm(chol, invchol, which_given = 1L, given, center = FALSE)A named list.
Cholesky factors of covariance matrices as
ltMatrices object, length is recylced to length of lower and
upper.
Cholesky factors of precision matrices as
ltMatrices object, length is recylced to length of lower and
upper. Either chol or invchol must be given.
names or indices of elements those marginal distribution is of interest.
names or indices of elements to condition on.
matrix of realisations to condition on (number of rows is
equal to length(which), the number of
columns corresponds to the number of matrices in chol
or invchol.
logical, if TRUE, the negative rescaled conditional mean is returned
(such that it can be specified as center argument to
slpmvnorm). By default, the conditional mean is returned.
Derives parameters of the requested marginal or conditional distributions,
defined by chol (Cholesky factor of covariance) or invchol
(Cholesky factor of precision matrix) and, for conditional distributions,
the mean.
More details can be found in the lmvnorm_src package vignette.
vignette("lmvnorm_src", package = "mvtnorm")