| interface | R Documentation |
A (still experimental) simple user interface for computing on multiple multivariate normal distributions.
mvnorm(mean, chol, invchol)
## S3 method for class 'mvnorm'
aperm(a, perm, ...)
margDist(object, which, ...)
## S3 method for class 'mvnorm'
margDist(object, which, ...)
condDist(object, which_given, given, ...)
## S3 method for class 'mvnorm'
condDist(object, which_given, given, ...)
## S3 method for class 'mvnorm'
simulate(object, nsim = dim(object$scale)[1L], seed = NULL,
standardize = FALSE, as.data.frame = FALSE, ...)
## S3 method for class 'mvnorm'
logLik(object, obs, lower, upper, standardize = FALSE, ...)
## S3 method for class 'mvnorm'
lLgrad(object, obs, lower, upper, standardize = FALSE, ...)
chol |
either an |
invchol |
either an |
a, object |
objects of class |
perm |
a permutation of the covariance matrix corresponding to |
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 |
lower |
matrix of lower limits (one column for each observation, |
upper |
matrix of upper limits (one column for each observation, |
obs |
matrix of exact observations (one column for each observation, |
mean |
matrix of means (one column for each observation, length is
recycled to length of |
seed |
an object specifying if and how the random number generator
should be initialized, see |
standardize |
logical, should the Cholesky factor (or its inverse) undergo standardization (ensuring the covariance matrix is a correlation matrix) before computing the likelihood. |
nsim |
number of samples to draw. |
as.data.frame |
logical, convert the $J x N$ matrix result to a classical $N x J$ data frame. |
... |
Additional arguments to |
The constructor mvnorm can be used to specify (multiple)
multivariate normal distributions. margDist derives marginal and
condDist conditional distributions from such objects. A
simulate method exists for drawn samples from multivariate
normals.
The continuous (data in obs), discrete (intervals in lower
and upper), and mixed continuous-discrete log-likelihood is
implemented in logLik. The corresponding gradients with respect
to all model parameters and with respect to the data arguments
is available from lLgrad.
Rationals and examples are given in Chapter 7 of the package vignette linked to below.
mvnorm, margDist, and condDist return objects
of class mvnorm. logLik returns the log-likelihood
and lLgrad a list with gradients.
vignette("lmvnorm_src", package = "mvtnorm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.