binom.pval              package:corpora              R Documentation

_P-_v_a_l_u_e_s _o_f _t_h_e _b_i_n_o_m_i_a_l _t_e_s_t _f_o_r _f_r_e_q_u_e_n_c_y _c_o_u_n_t_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 a binomial test for
     frequency counts.  In the two-sided case, a fast approximation is
     used that may be inaccurate for small samples.

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

     binom.pval(k, n, p = 0.5,
                alternative = c("two.sided", "less", "greater"))

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

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

       n: number of tokens in the corpus, i.e. sample size (or an
          integer vector specifying the sizes of different samples)

       p: null hypothesis, giving the assumed proportion of this type
          in the population (or a vector of proportions for different
          types and/or different populations)

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 'binom.test', this
     implementation can be applied to large frequencies and samples
     without a serious impact on performance.

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

     The p-value of a binomial test applied to the given data (or a
     vector of p-values).

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

     Stefan Evert

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

     'z.score.pval', 'prop.cint'

