mauchley.test             package:stats             R Documentation

_M_a_u_c_h_l_e_y'_s _t_e_s_t _o_f _s_p_h_e_r_i_c_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     Tests whether a Wishart-distributed covariance matrix (or
     transformation thereof) is proportional to a given matrix.

_U_s_a_g_e:

     ## S3 methods for class 'SSD' or 'mlm' 
     mauchley.test(object, Sigma = diag(nrow = p),
        T = Thin.row(proj(M) - proj(X)), M = diag(nrow = p), X = ~0,
        idata = data.frame(index = seq(length = p)), ...)

_A_r_g_u_m_e_n_t_s:

  object: object of class 'SSD' or 'mlm'

   Sigma: Matrix to be proportional to

       T: Transformation matrix. By default computed from 'M' and 'X'

       M: Formula or matrix describing the outer projection (see below)

       X: Formula or matrix describing the inner projection (see below)

   idata: Data frame describing intra-block design

     ...: For consistency with generic

_D_e_t_a_i_l_s:

     Mauchley's test test for whether a covariance matrix can be
     assumed to be proportional to a given matrix. 

     It is common to transform the observations prior to testing. This
     typically involves  transformation to intra-block differences, but
     more complicated within-block designs can be encountered, making
     more elaborate transformations necessary. A transformation matrix
     'T' can be given directly or specified as the difference between
     two projections onto the spaces spanned by 'M' and 'X', which in
     turn can be given as matrices or as model formulas with respect to
     'idata' (the tests will be invariant to parametrization of the
     quotient space 'M/X').

     The common use of this test is in repeated measurements designs,
     with 'X=~1'. This is almost, but not quite the same as testing for
     compund symmetry in the untransformed covariance matrix.

_V_a_l_u_e:

     An object of class '"htest"'

_N_o_t_e:

     The p-value differs slightly from that of SAS because a second
     order term is included in the asymptotic approximation.

_R_e_f_e_r_e_n_c_e_s:

     TW Anderson (1958). An Introduction to Multivariate Statistical
     Analysis. Wiley

_S_e_e _A_l_s_o:

     'SSD', 'anova.mlm'

_E_x_a_m_p_l_e_s:

     example(SSD) # Brings in the mlmfit and reacttime objects

     ### traditional test of intrasubj. contrasts
     mauchley.test(mlmfit, X=~1) 

     ### tests using intra-subject 3x2 design
     idata <- data.frame(deg=gl(3,1,6, labels=c(0,4,8)),
                         noise=gl(2,3,6, labels=c("A","P")))
     mauchley.test(mlmfit, X = ~ deg + noise, idata = idata)
     mauchley.test(mlmfit, M = ~ deg + noise, X = ~ noise, idata=idata)

