Learn R Programming

spaMM (version 1.7.2)

GHK_oneside: Compute GHK estimate of multivariate normal one-sided integral

Description

GHK_oneside computes the GHK estimate to the integral of a multivariate normal density over an intersection of half planes defined by a set of truncation points.

Usage

GHK_oneside(L, trunpt, above, nrep=1000)

Arguments

L
lower triangular Cholesky root of Covariance matrix
trunpt
vector of truncation points
above
vector of indicators for truncation above(1) or below(0)
nrep
number of draws to use in GHK

Value

  • A list with two elements: [object Object],[object Object]

concept

  • multivariate normal distribution
  • GHK method
  • integral

Details

See Train (2009) or Genz and Bretz (2009) for an introduction to the GHK (Geweke–Hajivassiliou–Keane) method. The C++ code underlying GHK_oneside builds on code from Peter Rossi, as implemented in version 2.2-5 of the bayesm package. It differs notably in the following ways: (i) it returns the log of the integral (which is more appropriate for values of the integral below the numeric limits for real numbers); (ii) it returns an estimates of the standard error of the log integral; (iii) it does not allow for computation of multiple integrals in one call.

References

Genz, A. and Bretz, F. (2009), Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Vol. 195. Springer-Verlag, Heidelberg. Peter Rossi. (2012). bayesm: Bayesian Inference for Marketing/Micro-econometrics. R package version 2.2-5. Train, Kenneth (2009) Discrete choice methods with simulation. Cambridge UP, 2nd ed.

Examples

Run this code
Sigma=matrix(c(1,.5,.5,1),ncol=2)
L=t(chol(Sigma))
trunpt=c(1,1)
above=c(1,1)
GHK_oneside(L,trunpt,above,100)

Run the code above in your browser using DataLab