mood.test               package:stats               R Documentation

_M_o_o_d _T_w_o-_S_a_m_p_l_e _T_e_s_t _o_f _S_c_a_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Performs Mood's two-sample test for a difference in scale
     parameters.

_U_s_a_g_e:

     mood.test(x, ...)

     ## Default S3 method:
     mood.test(x, y, alternative = c("two.sided", "less", "greater"), ...)

     ## S3 method for class 'formula':
     mood.test(formula, data, subset, na.action, ...)

_A_r_g_u_m_e_n_t_s:

    x, y: numeric vectors of data values.

alternative: indicates the alternative hypothesis and must be one of
          '"two.sided"' (default), '"greater"' or '"less"' all of which
          can be abbreviated.

 formula: a formula of the form 'lhs ~ rhs' where 'lhs' is a numeric
          variable giving the data values and 'rhs' a factor with two
          levels giving the corresponding groups.

    data: an optional matrix or data frame (or similar: see
          'model.frame') containing the variables in the formula
          'formula'.  By default the variables are taken from
          'environment(formula)'.

  subset: an optional vector specifying a subset of observations to be
          used.

na.action: a function which indicates what should happen when the data
          contain 'NA's.  Defaults to 'getOption("na.action")'.

     ...: further arguments to be passed to or from methods.

_D_e_t_a_i_l_s:

     The underlying model is that the two samples are drawn from f(x-l)
     and f((x-l)/s)/s, respectively, where l is a common location
     parameter and s is a scale parameter.

     The null hypothesis is s = 1.

     There are more useful tests for this problem.

_V_a_l_u_e:

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

statistic: the value of the test statistic.

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

alternative: a character string describing the alternative hypothesis.

  method: the character string '"Mood two-sample test of scale"'.

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

_R_e_f_e_r_e_n_c_e_s:

     William J. Conover (1971), _Practical nonparametric statistics_.
     New York: John Wiley & Sons. Pages 234f.

_S_e_e _A_l_s_o:

     'fligner.test' for a rank-based (nonparametric) k-sample test for
     homogeneity of variances; 'ansari.test' for another rank-based
     two-sample test for a difference in scale parameters; 'var.test'
     and 'bartlett.test' for parametric tests for the homogeneity in
     variance.

_E_x_a_m_p_l_e_s:

     ## Same data as for the Ansari-Bradley test:
     ## Serum iron determination using Hyland control sera
     ramsay <- c(111, 107, 100, 99, 102, 106, 109, 108, 104, 99,
                 101, 96, 97, 102, 107, 113, 116, 113, 110, 98)
     jung.parekh <- c(107, 108, 106, 98, 105, 103, 110, 105, 104,
                 100, 96, 108, 103, 104, 114, 114, 113, 108, 106, 99)
     mood.test(ramsay, jung.parekh)
     ## Compare this to ansari.test(ramsay, jung.parekh)

