Last data update: 2014.03.03

R: Truncated Normal Distribution Toolbox
TruncatedNormal-packageR Documentation

Truncated Normal Distribution Toolbox

Description

The routines include:

  • generator of independent and identically distributed random vectors from the truncated univariate and multivariate distributions;

  • (Quasi-) Monte Carlo estimator and a deterministic upper bound of the cumulative distribution function of the multivariate normal;

  • algorithm for the accurate computation of the quantile function of the normal distribution in the extremes of its tails.

Details

Package: Truncated Normal
Type: Package
Version: 1.0
Date: 2015-11-08
License: GPL-3
mvNcdf(l,u,Sig,n)

uses a Monte Carlo sample of size n to estimate the cumulative distribution function, Pr( l < X < u), of the d-dimensional multivariate normal with zero-mean and covariance Σ, that is, X has N(0,Σ) distribution;

mvNqmc(l,u,Sig,n)

provides a Quasi Monte Carlo algorithm for medium dimensions (say, d<50), in addition to the faster Monte Carlo algorithm in mvNcdf;

mvrandn(l,u,Sig,n)

simulates n identically and independently distributed random vectors X from N(0,Σ), conditional on l<X<u;

norminvp(p,l,u)

computes the quantile function at 0≤ p≤ 1 of the univariate N(0,1) distribution truncated to [l,u], and with high precision in the tails;

trandn(l,u)

is a fast random number generator from the univariate N(0,1) distribution truncated to [l,u].

Author(s)

Z. I. Botev, email: botev@unsw.edu.au and web page: http://web.maths.unsw.edu.au/~zdravkobotev/

References

  • Z. I. Botev (2015), The Normal Law Under Linear Restrictions: Simulation and Estimation via Minimax Tilting, submitted to JRSS(B)

  • Z. I. Botev and P. L'Ecuyer (2015), Efficient Estimation and Simulation of the Truncated Multivariate Student-t Distribution, Proceedings of the 2015 Winter Simulation Conference, Huntington Beach, CA, USA

  • Gibson G. J., Glasbey C. A., Elston D. A. (1994), Monte Carlo evaluation of multivariate normal integrals and sensitivity to variate ordering, In: Advances in Numerical Methods and Applications, pages 120–126

See Also

Matlab toolbox: http://web.maths.unsw.edu.au/~zdravkobotev/

Examples

trandn(4,5) # generate a variable from the truncated normal on [4,5]

Results