rwishart               package:bayesm               R Documentation

_D_r_a_w _f_r_o_m _W_i_s_h_a_r_t _a_n_d _I_n_v_e_r_t_e_d _W_i_s_h_a_r_t _D_i_s_t_r_i_b_u_t_i_o_n

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

     'rwishart' draws from the Wishart and Inverted Wishart
     distributions.

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

     rwishart(nu, V)

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

      nu: d.f. parameter

       V: pds location matrix

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

     In the parameterization used here, W ~ W(nu,V), E[W]=nuV.  

     If you want to use an Inverted Wishart prior, you _must invert the
     location matrix_  before calling 'rwishart', e.g. 
      Sigma ~ IW(nu,V);  Sigma^{-1} ~ W(nu,V^{-1}).

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

       W: Wishart draw 

     IW : Inverted Wishart draw

      C : Upper tri root of W

     CI : inv(C), W^{-1} = CICI'

_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)
     rwishart(5,diag(3))$IW

