betabinexch            package:LearnBayes            R Documentation

_L_o_g _p_o_s_t_e_r_i_o_r _o_f _l_o_g_i_t _m_e_a_n _a_n_d _l_o_g _p_r_e_c_i_s_i_o_n _f_o_r _B_i_n_o_m_i_a_l/_b_e_t_a _e_x_c_h_a_n_g_e_a_b_l_e _m_o_d_e_l

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

     Computes the log posterior density of logit mean and log precision
     for a Binomial/beta exchangeable model

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

     betabinexch(theta,data)

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

   theta: matrix of parameter values where each row represents a value
          of (logit eta, log K)

    data: a matrix with columns y (counts) and n (sample sizes)

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

     vector of values of the log posterior where each value corresponds
     to each row of the parameters in theta

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

     Jim Albert

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

     n=c(20,20,20,20,20)
     y=c(1,4,3,6,10)
     data=cbind(y,n)
     par1=c(-1,0)
     par2=c(-1,1)
     theta=rbind(par1,par2)
     betabinexch(theta,data)

