logctablepost           package:LearnBayes           R Documentation

_L_o_g _p_o_s_t_e_r_i_o_r _o_f _d_i_f_f_e_r_e_n_c_e _a_n_d _s_u_m _o_f _l_o_g_i_t_s _i_n _a _2_x_2 _t_a_b_l_e

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

     Computes the log posterior density for the difference and sum of
     logits in a 2x2 contingency table for independent binomial samples
     and uniform prior placed on the logits

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

     logctablepost(theta,data)

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

   theta: matrix of parameter values where each row represents
          (difference of logits, sum of logits)

    data: vector containing number of successes and failures for first
          sample, and then second sample

_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:

     s1=6; f1=2; s2=3; f2=10
     data=c(s1,f1,s2,f2)
     theta1=c(2,4); theta2=c(1,1)
     theta=rbind(theta1,theta2)
     logctablepost(theta,data)

