rvnorm                  package:rv                  R Documentation

_G_e_n_e_r_a_t_e _R_a_n_d_o_m _V_a_r_i_a_b_l_e_s _f_r_o_m _a _G_a_u_s_s_i_a_n (_N_o_r_m_a_l) _S_a_m_p_l_i_n_g _M_o_d_e_l

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

     Generates a random vector from a Gaussian sampling model.

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

       rvnorm(n=1, mean=0, sd=1, var=NULL, precision)

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

       n: integer: number of variables to generate

    mean: mean, may be a rv

      sd: standard deviation; scalar or vector (constant or rv, not
          matrix)

     var: variance, can be given instead of sd. Scalar, vector, or
          matrix.

precision: inverse variance or variance matrix, may be given instead of
          sd or var

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

     A random vector (rv object) of length 'n'.

_N_o_t_e:

     If any of the arguments are random,  the resulting simulations may
     have non-normal marginal distributions; for example, if an
     inverse-chi-squared scalar rv 'var'  and zero 'mean' is given, the
     resulting rv will have a t-distribution.

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

     Jouni Kerman kerman@stat.columbia.edu <URL:
     http://www.stat.columbia.edu/~kerman>

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

     Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing
     Posterior Simulations Using Random Variable Objects. Technical
     report, Columbia University, New York.

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

       x <- rvnorm(mean=1:10, sd=1:10) # A vector of length 10.
       Sigma <- diag(1:10)
       y <- rvnorm(mean=1:10, var=Sigma)

