rtrun draws from a truncated univariate normal distribution
Usage
rtrun(mu, sigma, a, b)
Arguments
mu
mean
sigma
sd
a
lower bound
b
upper bound
Value
draw (possibly a vector)
Warning
This routine is a utility routine that does not check the
input arguments for proper dimensions and type.
Details
Note that due to the vectorization of the rnorm,qnorm commands in R, all arguments can be vectors of
equal length. This makes the inverse CDF method the most efficient to use in R.
References
For further discussion, see Bayesian Statistics and Marketing
by Rossi, Allenby and McCulloch, Chapter 2.
http://www.perossi.org/home/bsm-1