donner                  package:aod                  R Documentation

_T_e_s_t _o_f _P_r_o_p_o_r_t_i_o_n _H_o_m_o_g_e_n_e_i_t_y _u_s_i_n_g _D_o_n_n_e_r'_s _A_d_j_u_s_t_m_e_n_t

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

     Tests the homogeneity of proportions between I groups (H0: p_1 =
     p_2 = ... = p_I ) from clustered binomial data (n, y) using the
     adjusted chi-squared statistic proposed by Donner (1989).

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

     donner(formula = NULL, response = NULL,
            weights = NULL, group = NULL, data, C = NULL)

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

 formula: An optional formula where the left-hand side is either a
          matrix of the form 'cbind(y, n-y)', where  the modelled
          probability is 'y/n', or a vector of proportions to be
          modelled ('y/n'). In both cases, the  right-hand side must
          specify a single grouping variable. When the left-hand side
          of the formula is a vector of  proportions, the argument
          'weight' must be used to indicate the denominators of the
          proportions.

response: An optional argument indicating either a matrix of the form
          'cbind(y, n-y)', where the modelled  probability is 'y/n', or
          a vector of proportions to be modelled ('y/n').

 weights: An optional argument used when the left-hand side of
          'formula' or 'response' is a vector  of proportions: 'weight'
          is the denominator of the proportion.

   group: An optional argument only used when 'response' is used. In
          this case, this argument is a factor  indicating a grouping
          variable.

    data: A data frame containing the response ('n' and 'y') and the
          grouping variable.

       C: If not NULL, a numerical vector of I cluster correction
          factors.

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

     The chi-squared statistic is adjusted with the correction factor
     C_i computed in each group i. The test statistic is given by:

      X^2 = sum( (y_i - n_i * p)^2 / (C_i * n_i * p * (1 - p)) )

     where C_i = 1 + (nA_i - 1) * rho, nA_i is a scalar depending on
     the cluster sizes, and rho is the ANOVA estimate of the
     intra-cluster correlation, assumed common across groups (see
     Donner, 1989 or Donner et al., 1994). The statistic is compared to
     a chi-squared distribution with I - 1 degrees of freedom. Fixed
     correction factors can be specified with the argument 'C'.

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

     An object of formal class "drs": see 'drs-class' for details. The
     slot 'tab' provides the proportion of successes and the correction
     factor for each group.

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

     Matthieu Lesnoff matthieu.lesnoff@cirad.fr, Renaud Lancelot
     renaud.lancelot@cirad.fr

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

     Donner, A., 1989. _Statistical methods in ophthalmology: an
     adjusted chi-squared approach_. Biometrics 45, 605-611.
      Donner, A., 1993. _The comparison of proportions in the presence
     of litter effects_. Prev. Vet. Med. 18, 17-26.
      Donner, A., Eliasziw, M., Klar, N., 1994. _A comparison of
     methods for testing homogeneity of proportions in  teratologic
     studies_. Stat. Med. 13, 1253-1264.

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

     'chisq.test', 'raoscott', 'drs-class'

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

       data(rats)
       donner(formula = cbind(y, n - y) ~ group, data = rats)
       donner(formula = y/n ~ group, weights = n, data = rats)
       donner(response = cbind(y, n - y), group = group, data = rats)
       donner(response = y/n, weights = n, group = group, data = rats)
       # standard test
       donner(cbind(y, n - y) ~ group, data = rats, C = c(1, 1))
       data(antibio)
       donner(cbind(y, n - y) ~ treatment, data = antibio)
       

