condMom                package:bayesm                R Documentation

_C_o_m_p_u_t_e_s _C_o_n_d_i_t_i_o_n_a_l _M_e_a_n/_V_a_r _o_f _O_n_e _E_l_e_m_e_n_t _o_f _M_V_N _g_i_v_e_n _A_l_l _O_t_h_e_r_s

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

     'condMom' compute moments of conditional distribution of ith
     element of normal given all others.

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

     condMom(x, mu, sigi, i)

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

       x: vector of values to condition on - ith element not used 

      mu: length(x) mean vector 

    sigi: length(x)-dim covariance matrix 

       i: conditional distribution of ith element 

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

     x ~ MVN(mu,Sigma).

     'condMom' computes moments of x_i given x_{-i}.

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

     a list containing:

  cmean : cond mean 

   cvar : cond variance

_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. 
      <URL:
     http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html>

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

     ##
     sig=matrix(c(1,.5,.5,.5,1,.5,.5,.5,1),ncol=3)
     sigi=chol2inv(chol(sig))
     mu=c(1,2,3)
     x=c(1,1,1)
     condMom(x,mu,sigi,2)

