mvnintGHK: Computing Multivariate Normal Rectangle Probability

View source: R/mvnintGHK.R

mvnintGHKR Documentation

Computing Multivariate Normal Rectangle Probability

Description

Computes the multivariate normal rectangle probability for arbitrary limits and covariance matrices using (reordered) sequential importance sampling.

Usage

mvnintGHK(mean, sigma, lower, upper, nrep = 5000, log = TRUE,
  reorder = TRUE)

Arguments

mean

the numeric vector of mean of length n.

sigma

the covariance matrix of dimension n.

lower

the numeric vector of lower limits of length n.

upper

the numeric vector of upper limits of length n.

nrep

a positive integer of Monte Carlo size.

log

if TRUE then return the log of the probability. If FALSE return the probability.

reorder

if TRUE then variable reordering algorithm is applied. If FALSE then original ordering is used.

Details

This program implemented the Geweke-Hajivassiliou-Keane simulator of computing the multivariate normal rectangle probability. For more details see Keane (1994). Also a variable reordering algorithm in Gibson, etal (1994) was implemented.

Note that both -Inf and Inf may be specified in lower and upper.

Value

A list of the following two components:

value

the value of the integral. If log = TRUE then output the log of the integral.

error

the Monte Carlo standard deviation.

Author(s)

Zifei Han hanzifei1@gmail.com

References

Gibson GJ., Glasbey CA. and Elston DA. (1994) Monte Carlo evaluation of multivariate normal integrals and sensitivity to variate ordering. Advances in Numerical Methods and Applications, World Scientific Publishing, River Edge.

Keane, M. (1994) A computationally practical simulation estimator for panel data. Econometrica, 62:95-116.

See Also

pmvnorm

Examples

mvnintGHK(mean = rep(0, 51), sigma =  diag(0.2, 51) + matrix(0.8, 51, 51),
          lower = rep(-2,51), upper = rep(2,51), nrep = 10000)

gcKrig documentation built on July 3, 2022, 1:05 a.m.

Related to mvnintGHK in gcKrig...