Learn R Programming

TruncatedNormal (version 2.3)

mvTqmc: Truncated multivariate student cumulative distribution (QMC version)

Description

Computes an estimator of the probability Pr\((l<X<u)\), where X is a zero-mean multivariate student vector with scale matrix Sig and degrees of freedom df. Infinite values for vectors u and l are accepted.

Usage

mvTqmc(l, u, Sig, df, n = 1e+05)

Value

a list with components

  • prob: estimated value of probability Pr\((l<X<u)\)

  • relErr: estimated relative error of estimator

  • upbnd: theoretical upper bound on true Pr\((l<X<u)\)

Arguments

l

lower bound for truncation (infinite values allowed)

u

upper bound for truncation

Sig

covariance matrix

df

degrees of freedom

n

sample size

Author

Matlab code by Zdravko I. Botev, R port by Leo Belzile

Details

This version uses a Quasi Monte Carlo (QMC) pointset of size ceiling(n/12) and estimates the relative error using 12 independent randomized QMC estimators; QMC is slower than ordinary Monte Carlo (see mvTcdf), but is also likely to be more accurate when \(d<50\).

References

Z. I. Botev (2017), The Normal Law Under Linear Restrictions: Simulation and Estimation via Minimax Tilting, Journal of the Royal Statistical Society, Series B, 79 (1), pp. 1--24

Z. I. Botev and P. L'Ecuyer (2015), Efficient probability estimation and simulation of the truncated multivariate Student-t distribution, Proceedings of the 2015 Winter Simulation Conference, pp. 380-391

See Also

mvTcdf, mvrandt, mvNqmc, mvrandn

Examples

Run this code
d <- 25; nu <- 30;
l <- rep(1, d) * 5; u <- rep(Inf, d);
Sig <- 0.5 * matrix(1, d, d) + 0.5 * diag(d);
est <- mvTqmc(l, u, Sig, nu, n = 1e4)
if (FALSE) {
d <- 5
Sig <- solve(0.5*diag(d)+matrix(0.5, d,d))
## mvtnorm::pmvt(lower = rep(-1,d), upper = rep(Inf, d), df = 10, sigma = Sig)[1]
mvTqmc(rep(-1, d), u = rep(Inf, d), Sig = Sig, df = 10, n=1e4)$prob
}

Run the code above in your browser using DataLab