Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mvTcdf

Truncated multivariate student cumulative distribution


Description

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

Usage

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

Arguments

l

lower bound for truncation (infinite values allowed)

u

upper bound for truncation

Sig

covariance matrix

df

degrees of freedom

n

sample size

Details

Monte Carlo method uses sample size n; the larger the n, the smaller the relative error of the estimator;

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)

Note

If you want to estimate Pr(l<Y<u), where Y follows a Student distribution with df degrees of freedom, location vector m and scale matrix Sig, then use mvTqmc(Sig, l - m, u - m, nu, n).

Author(s)

Matlab code by Zdravko Botev, R port by Leo Belzile

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

Examples

d <- 15; nu <- 30;
 l <- rep(2, d); u <- rep(Inf, d);
 Sig <- 0.5 * matrix(1, d, d) + 0.5 * diag(1, d);
 est <- mvTcdf(l, u, Sig, nu, n = 1e4)
 # mvtnorm::pmvt(lower = l, upper = u, df = nu, sigma = Sig)
## Not run: 
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]
mvTcdf(rep(-1, d), u = rep(Inf, d), Sig = Sig, df = 10, n=1e4)$prob

## End(Not run)

TruncatedNormal

Truncated Multivariate Normal and Student Distributions

v2.2
GPL-3
Authors
Zdravko Botev [aut] (<https://orcid.org/0000-0001-9054-3452>), Leo Belzile [aut, cre] (<https://orcid.org/0000-0002-9135-014X>)
Initial release
2020-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.