Sample from a truncated normal distribution. Samples are drawn componentwise, so each component of the vector is allowed its own mean, standard deviation, and upper and lower limits. The components are assumed to be independent.
rtruncnormRcpp(y_lower, y_upper, mu, sigma, u_rand)
z_star m x 1
draw from the truncated normal distribution
m x 1
vector of lower endpoints
m x 1
vector of upper endpoints
m x 1
vector of conditional expectations
m x 1
vector of conditional standard deviations
m x 1
vector of uniform random variables