Learn R Programming

mvtnorm (version 0.1-8)

pmvnorm: Multivariate Normal Distribution

Description

Computes the distribution function of the multivariate normal distribution for arbitary 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.

Value

  • A list with the following components:
  • valueestimated integral value.
  • errorestimated absolute error.
  • msgstatus messages.

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.

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

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

Run this code
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)

Run the code above in your browser using DataLab