We study and compare various methods to generate a random variate from the normal distribution truncated to some finite or semi-infinite interval, with special attention to the situation where the interval is far in the tail. This is required in particular for certain applications in Bayesian statistics, such as to perform exact posterior simulations for parameter inference, but could have many other applications as well. We distinguish the case in which inversion is warranted, and that in which a rejection method is also fine. The algorithms are implemented and available in Java, R, and MATLAB, and the software is freely available.
Paru en juillet 2016 , 14 pages