bfexch              package:LearnBayes              R Documentation

_L_o_g_a_r_i_t_h_m _o_f _i_n_t_e_g_r_a_l _o_f _B_a_y_e_s _f_a_c_t_o_r _f_o_r _t_e_s_t_i_n_g _h_o_m_o_g_e_n_e_i_t_y _o_f _p_r_o_p_o_r_t_i_o_n_s

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

     Computes the logarithm of the integral of the Bayes factor for
     testing homogeneity of a set of proportions

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

     bfexch(theta,datapar)

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

   theta: vector of values of the logit of the prior mean
          hyperparameter

 datapar: list with components data, matrix with columns y (counts) and
          n (sample sizes), and K, prior precision hyperparameter

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

     vector of values of the logarithm of the integral

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

     Jim Albert

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

     y=c(1,3,2,4,6,4,3)
     n=c(10,10,10,10,10,10,10)
     data=cbind(y,n)
     K=20
     datapar=list(data=data,K=K)
     theta=c(-1,0,1,2)
     bfexch(theta,datapar)

