[R] new to repeated measures anova in R

peter dalgaard pdalgd at gmail.com
Mon Mar 5 17:28:32 CET 2012


On Mar 5, 2012, at 16:05 , Tamre Cardoso wrote:

> Thank you.
> 
> I have attached the data:

The list software seems to have scrubbed it though...

> The error message from Anova is:  
> 
>> pressure.aov = Anova(multmodel, idata=fact.idata, idesign = ~Shoe * Region, type="III")
> Error in linearHypothesis.mlm(mod, hyp.matrix, SSPE = SSPE, idata = idata,  : 
>  The error SSP matrix is apparently of deficient rank = 9 < 14

Oho. Yes that can be a problem. I it is not actually required to have a full rank SSP to do the F tests, but the design of Anova() is such that it tries to do multivariate analyses somewhere along the way, and I don't think there's a way to tell it not to (John?). 

I don't think plain anova.mlm has this particular restriction. It's basically the same issue as this:

> X <- matrix(rnorm(12),3,4)
> idata <- data.frame(gg = factor(1:4))
> anova(m,idata=idata, X=~1, test="Spherical")
Analysis of Variance Table


Contrasts orthogonal to
~1

Greenhouse-Geisser epsilon: 0.4312
Huynh-Feldt epsilon:        0.8876

            Df      F num Df den Df  Pr(>F)  G-G Pr  H-F Pr
(Intercept)  1 0.3376      3      6 0.79935 0.66045 0.77968
Residuals    2                                             
> Anova(m,idata=idata, idesign=~gg, type="III")
Error in linearHypothesis.mlm(mod, hyp.matrix, SSPE = SSPE, idata = idata,  : 
  The error SSP matrix is apparently of deficient rank = 2 < 3
> anova(m,idata=idata, X=~1) # Full MV test fails here too
Error in anova.mlm(m, idata = idata, X = ~1) : residuals have rank 2 < 3


-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list