rtrun                 package:bayesm                 R Documentation

_D_r_a_w _f_r_o_m _T_r_u_n_c_a_t_e_d _U_n_i_v_a_r_i_a_t_e _N_o_r_m_a_l

_D_e_s_c_r_i_p_t_i_o_n:

     'rtrun' draws from a truncated univariate normal distribution

_U_s_a_g_e:

     rtrun(mu, sigma, a, b)

_A_r_g_u_m_e_n_t_s:

      mu: mean 

   sigma: sd 

       a: lower bound 

       b: upper bound 

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     draw (possibly a vector)

_W_a_r_n_i_n_g:

     This routine is a utility routine that does *not* check the input
     arguments for proper dimensions and type.

_A_u_t_h_o_r(_s):

     Peter Rossi, Graduate School of Business, University of Chicago,
     Peter.Rossi@ChicagoGsb.edu.

_R_e_f_e_r_e_n_c_e_s:

     For further discussion, see _Bayesian Statistics and Marketing_ by
     Rossi, Allenby and McCulloch, Chapter 2. 
      <URL:
     http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html>

_E_x_a_m_p_l_e_s:

     ##
     set.seed(66)
     rtrun(mu=c(rep(0,10)),sigma=c(rep(1,10)),a=c(rep(0,10)),b=c(rep(2,10)))

