mantelhaen.test            package:ctest            R Documentation

_M_a_n_t_e_l-_H_a_e_n_s_z_e_l _C_h_i-_S_q_u_a_r_e _T_e_s_t _f_o_r _C_o_u_n_t _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     `mantelhaen.test' performs a Mantel-Haenszel chi-square test of
     the null that `x' and `y' are conditionally independent in each
     stratum.

_U_s_a_g_e:

     mantelhaen.test(x, y = NULL, z = NULL, correct = TRUE)

_A_r_g_u_m_e_n_t_s:

       x: either an array of dimension 2 by 2 by s, where s is the
          number of strata, or a dichotomous factor object.

       y: a dichotomous factor object;  ignored if x is an array.

       z: a factor object idenitifying to which stratum the
          corresponding elements in `x' and `y' belong; ignored if `x'
          is an array.

 correct: a logical indicating whether to apply continuity correction
          when computing the test statistic.

_D_e_t_a_i_l_s:

     If `x' is an array, it must be of dimension 2 by 2 by s, and the
     entries should be nonnegative integers.  `NA''s are not allowed. 
     Otherwise, `x', `y' and `z' must have the same length.  Triples
     containing `NA''s are removed.  Both `x' and `y' must be
     dichotomous (take exactly 2 values).

_V_a_l_u_e:

     A list with class `"htest"' containing the following components: 

statistic: the Mantel-Haenszel chi-square statistic.

parameter: always 1, the degrees of freedom of the approximate
          chi-square distribution of the test statistic.

 p.value: the p-value of the test.

  method: a string indicating the method employed, and whether or not
          continuity correction was used.

data.name: a character string giving the names of the data.

_R_e_f_e_r_e_n_c_e_s:

     Alan Agresti (1990). Categorical data analysis. New York: Wiley.
     Pages 230-234.

_E_x_a_m_p_l_e_s:

     data(UCBAdmissions)
     mantelhaen.test(UCBAdmissions)
     ## No evidence for association between admission and gender
     ## when adjusted for department

