Truncated Normal

Description

Generate one sample from N(mu,sig^2)1_{above > x > below}

Usage

1
rand_truncated_normal_rej_twosided(mu, sig, below, above)

Arguments

mu

mean

sig

standard deviation

below

lower cutoff

above

higher cutoff

Details

Generate one sample from N(mu,sig^2)1_{above > x > below}

Author(s)

Hao Wang ; Sophia Zhengzi Li

References

Proposition 2.3 C. P. Robert 'Simulation of truncated normal variables' see also Wang and Li (2011) "Efficient Gaussian Graphical Model Determination without Approximating Normalizing Constant of the G-Wishart distribution " http://www.stat.sc.edu/~wang345/RESEARCH/GWishart/GWishart.html