bfindep              package:LearnBayes              R Documentation

_B_a_y_e_s _f_a_c_t_o_r _a_g_a_i_n_s_t _i_n_d_e_p_e_n_d_e_n_c_e _a_s_s_u_m_i_n_g _a_l_t_e_r_n_a_t_i_v_e_s _c_l_o_s_e _t_o _i_n_d_e_p_e_n_d_e_n_c_e

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

     Computes a Bayes factor against independence for a two-way
     contingency table assuming a "close to independence" alternative
     model

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

     bfindep(y,K,m)

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

       y: matrix of counts

       K: Dirichlet precision hyperparameter

       m: number of simulations

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

      bf: value of the Bayes factor against hypothesis of independence

     nse: estimate of the simulation standard error of the computed
          Bayes factor

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

     Jim Albert

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

     y=matrix(c(10,4,6,3,6,10),c(2,3))
     K=20
     m=1000
     bfindep(y,K,m)

