tmvnorm: Truncated Multivariate Normal Density In tmvtnorm: Truncated Multivariate Normal and Student t Distribution

Description

This function provides the joint density function for the truncated multivariate normal distribution with mean equal to mean and covariance matrix sigma, lower and upper truncation points lower and upper. For convenience, it furthermore serves as a wrapper function for the one-dimensional and bivariate marginal densities dtmvnorm.marginal() and dtmvnorm.marginal2() respectively when invoked with the margin argument.

Usage

 1 2 3 4 5 6 dtmvnorm(x, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)), lower=rep(-Inf, length = length(mean)), upper=rep( Inf, length = length(mean)), log=FALSE, margin=NULL)

Arguments

 x Vector or matrix of quantiles. If x is a matrix, each row is taken to be a quantile. mean Mean vector, default is rep(0, nrow(sigma)). sigma Covariance matrix, default is diag(length(mean)). lower Vector of lower truncation points, default is rep(-Inf, length = length(mean)). upper Vector of upper truncation points, default is rep( Inf, length = length(mean)). log Logical; if TRUE, densities d are given as log(d). margin if NULL then the joint density is computed (the default), if MARGIN=1 then the one-dimensional marginal density in variate q (q = 1..length(mean)) is returned, if MARGIN=c(q,r) then the bivariate marginal density in variates q and r for q,r = 1..length(mean) and q != r is returned.

Details

The computation of truncated multivariate normal probabilities and densities is done using conditional probabilities from the standard/untruncated multivariate normal distribution. So we refer to the documentation of the mvtnorm package and the methodology is described in Genz (1992, 1993).

Author(s)

Stefan Wilhelm <[email protected]>

References

Genz, A. (1992). Numerical computation of multivariate normal probabilities. Journal of Computational and Graphical Statistics, 1, 141–150

Genz, A. (1993). Comparison of methods for the computation of multivariate normal probabilities. Computing Science and Statistics, 25, 400–405

Johnson, N./Kotz, S. (1970). Distributions in Statistics: Continuous Multivariate Distributions Wiley & Sons, pp. 70–73

Horrace, W. (2005). Some Results on the Multivariate Truncated Normal Distribution. Journal of Multivariate Analysis, 94, 209–221