margcond {mvtnorm} | R Documentation |
Marginal and Conditional Multivariate Normal Distributions
Description
Computes means and Cholesky factors of covariance or precision matrices of multiple multivariate normal distributions.
Usage
marg_mvnorm(chol, invchol, which = 1L)
cond_mvnorm(chol, invchol, which_given = 1L, given, center = FALSE)
Arguments
chol |
Cholesky factors of covariance matrices as
|
invchol |
Cholesky factors of precision matrices as
|
which |
names or indices of elements those marginal distribution is of interest. |
which_given |
names or indices of elements to condition on. |
given |
matrix of realisations to condition on (number of rows is
equal to |
center |
logical, if |
Details
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.
Value
A named list.
See Also
vignette("lmvnorm_src", package = "mvtnorm")