normchi2post           package:LearnBayes           R Documentation

_L_o_g _p_o_s_t_e_r_i_o_r _d_e_n_s_i_t_y _f_o_r _m_e_a_n _a_n_d _v_a_r_i_a_n_c_e _f_o_r _n_o_r_m_a_l _s_a_m_p_l_i_n_g

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

     Computes the log of the posterior density of a mean M and a
     variance S2 when a sample is taken from a normal density and a
     standard noninformative prior is used.

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

     normchi2post(theta,data)

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

   theta: matrix of parameter values where each row is a value of (M,
          S2)

    data: vector containing the sample observations

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

     a vector of values of the log posterior where the values corresond
     to the rows in theta

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

     Jim Albert

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

     parameter1=c(20,5)
     parameter2=c(25,5)
     parameter=rbind(parameter1,parameter2)
     data=c(20, 32, 21, 43, 33, 21, 32)
     normchi2post(parameter,data)

