fisher.pval             package:corpora             R Documentation

_P-_v_a_l_u_e_s _o_f _F_i_s_h_e_r'_s _e_x_a_c_t _t_e_s_t _f_o_r _f_r_e_q_u_e_n_c_y _c_o_m_p_a_r_i_s_o_n_s (_c_o_r_p_o_r_a)

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

     This function computes the p-value of Fisher's exact test (Fisher
     1934) for the comparison of corpus frequency counts (under the
     null hypothesis of equal population proportions).  In the
     two-sided case, a fast approximation is used that may be
     inaccurate for small samples.

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

     fisher.pval(k1, n1, k2, n2, 
                alternative = c("two.sided", "less", "greater"))

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

      k1: frequency of a type in the first corpus (or an integer vector
          of type frequencies)

      n1: the sample size of the first corpus (or an integer vector
          specifying the sizes of different samples)

      k2: frequency of the type in the second corpus (or an integer
          vector of type frequencies, in parallel to 'k1')

      n2: the sample size of the second corpus (or an integer vector
          specifying the sizes of different samples, in parallel to
          'n1')

alternative: a character string specifying the alternative hypothesis;
          must be one of 'two.sided' (default), 'less' or 'greater'

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

     When 'alternative' is 'two.sided', a fast approximation of the
     two-sided p-value is used (multiplying the appropriate
     single-sided tail probability by two), which may be inaccurate for
     small samples.  Unlike the exact algorithm of 'fisher.test', this
     implementation is memory-efficient and can be applied to large
     samples and/or large frequency counts.

     For one-sided tests, the p-values returned by this functions are
     identical to those computed by 'fisher.test' on two-by-two
     contingency tables.

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

     The p-value of Fisher's exact test applied to the given data (or a
     vector of p-values).

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

     Stefan Evert

_R_e_f_e_r_e_n_c_e_s:

     Fisher, R. A. (1934). _Statistical Methods for Research Workers_.
     Oliver & Boyd, Edinburgh, 2nd edition (1st edition 1925, 14th
     edition 1970).

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

     'fisher.test', 'chisq.pval', 'rel.risk.cint'

