dnoncenhypergeom          package:MCMCpack          R Documentation

_E_v_a_l_u_a_t_e _D_e_n_s_i_t_y _o_f _N_o_n_c_e_n_t_r_a_l _H_y_p_e_r_g_e_o_m_e_t_r_i_c _D_i_s_t_r_i_b_u_t_i_o_n

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

     This function evaluates the density of the the Noncentral  
     Hypergeometric distribution at a single point or all points.

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

     dnoncenhypergeom(x=NA, n1, n2, m1, psi)

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

       x: The location to evaluate the density.  If 'x' is NA, then a
          matrix is returned with the density evaluated at all possible
          points.

      n1: The size of group one.

      n2: The size of group two.

      m1: The observed number of positive outcomes (in both groups).

     psi: Odds ratio.

_D_e_t_a_i_l_s:

     The Noncentral Hypergeometric is particularly useful for
     conditional inference for (2 x 2) tables.  We use the
     parameterization and algorithms of Liao and Rosen (2001).  The
     underlying R code is based on their published code.  See their
     article for details of the parameterization.

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

     The density evaluated at point 'x', or a matrix with the first
     column containing the possible values of the random variable, and
     the second column containing the probabilities.

_S_o_u_r_c_e:

     L. G. Liao and Ori Rosen. 2001. ``Fast and Stable Algorithms for
     Computing and Sampling From the Noncentral Hypergeometric
     Distribution." _The American Statistician._ 55: 366-369.

_S_e_e _A_l_s_o:

     'rnoncenhypergeom'

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

       dnoncenhypergeom(NA, 500, 500, 500, 6.0)

