pmvnorm {mvtnorm}R Documentation

Multivariate Normal Distribution

Description

Computes the distribution function of the multivariate normal distribution for arbitrary limits and correlation matrices based on algorithms by Genz and Bretz.

Usage

pmvnorm(mean, corr, lower, upper, maxpts = 25000, abseps =0.001, releps = 0)

Arguments

mean the mean vector of length n.
corr the correlation matrix of dimension n.
lower the vector of lower limits of length n.
upper the vector of upper limits of length n.
maxpts maximum number of function values as integer.
abseps absolute error tolerance as double.
releps relative error tolerance as double.

Details

This program involves the computation of multivariate normal-probabilities with arbitrary correlation matrices. It involves both the computation of singular and nonsingular probabilities. The methodology is described in Genz (1992, 1993).

Note that both -Inf and +Inf may be specified in lower and upper. For more details see pmvt.

The mvn case is treated as a special case of pmvt with df=0.

Univariate problems are passed to pnorm.

Multivariate normal density and random numbers are available using dmvnorm and mvrnorm.

Value

A list with the following components:

value estimated integral value.
error estimated absolute error.
msg status messages.

Author(s)

Fortran Code by Alan Genz <AlanGenz@wsu.edu> and Frank Bretz <bretz@ifgb.uni-hannover.de>, R port by Torsten Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de>

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

Examples


n <- 5
mean <- rep(0, 5)
lower <- rep(-1, 5)
upper <- rep(3, 5)
corr <- diag(5)
corr[lower.tri(corr)] <- 0.5
prob <- pmvnorm(mean, corr, lower, upper)
print(prob)

pmvnorm(0, 1, -Inf, 3)$value == pnorm(3)