Computation of Multivariate normal and Student-t probabilities using the classic Genz method form packages mvtnorm and tlrmvnmvt packages. In order to save computational effort, it chooses whether to use the function pmvtnorm (pmvt) from mvtnorm, or functions pmvn (pmvt) from the tlrmvnmvt package, depending of the vector size p, real or integer degrees of freedom nu.
lower: lower integration limits, a numeric vector of length p
upper: upper integration limits, a numeric vector of length p
mean: the location parameter, a numeric vector of length p
sigma: the scale matrix, a square matrix that matches the length of lower
nu: degrees of freedom, a positive real number. If NULL, normal case is considered
uselog2: a boolean variable, indicating if the log2 result should be returned. This is useful when the true probability is too small for the machine precision
Returns
The estimated probability or its log2 if uselog2 == TRUE
References
Genz, A. (1992), "Numerical computation of multivariate normal probabilities," Journal of Computational and Graphical Statistics, 1, 141-149.
Cao, J., Genton, M. G., Keyes, D. E., & Turkiyyah, G. M. "Exploiting Low Rank Covariance Structures for Computing High-Dimensional Normal and Student- t Probabilities" (2019) https://marcgenton.github.io/2019.CGKT.manuscript.pdf