z.score               package:corpora               R Documentation

_T_h_e _z-_s_c_o_r_e _s_t_a_t_i_s_t_i_c _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 a z-score statistic for frequency counts,
     based on a normal approximation to the correct binomial
     distribution under the random sampling model.

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

     z.score(k, n, p = 0.5, correct = TRUE)

_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)

 correct: if 'TRUE', apply Yates' continuity correction (default)

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

     The z statistic is given by 

                   z := (k - np) / sqrt(n p (1-p))

     When Yates' continuity correction is enabled, the _absolute value_
     of the numerator d := k - np is reduced by 1/2, but clamped to a
     non-negative value.

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

     The z-score corresponding to the specified data (or a vector of
     z-scores).

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

     Stefan Evert

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

     'z.score.pval'

