1
$\begingroup$

I often have to do repeated-measures ANOVA with Greenhouse-Geisser or Huynh-Feldt corrections, so I use Anova (as described in http://www.r-bloggers.com/r-tutorial-series-two-way-repeated-measures-anova/, and the A "doubly multivariate" design with two distinct repeated-measures variables from the Anova help page). So far I have only done this with fully within-subjects designs. For example, with this dataset, I can run:

data <- read.table( file="D:\\TassMMN\\mnrpt\\mnrpt_rejthresh.txt", header=F )
Contrast <- factor( c("T2T3", "T2T4", "T2T3", "T3T4", "T2T4", "T3T4") )
Dummy <- factor( c("A", "A", "B", "A", "B", "B") )
library(car)
summary( Anova( lm( as.matrix(data) ~ 1 ), idata=data.frame(Contrast,Dummy), idesign=~Contrast*Dummy ) )

However, I don't understand how to do this with a between-subjects factor (for example, if the first 8 lines of that dataset were subjects from one group, and the next 8 from another group). The closest answer I have found is this thread, which is discussing a different method with lme(). Does anyone know how to do this in {car}Anova, with something similar to the method I've used above?

Thanks!

$\endgroup$
  • $\begingroup$ Take a look at ezANOVA in the package ez, which provides a number of convience functions and wrappers for doing Type-II (which is what car::Anova does by default) and Type-III (which car::Anova can optionally do) ANOVA. $\endgroup$ – Livius Jan 25 '15 at 10:57
  • $\begingroup$ Thanks Livius. I've heard that this can be done with ezANOVA functions, but also figured I'd ask around for a native car::Anova way to do it using the code I more or less already have. But I'll also look into ezAnova, maybe that will be ez-er! $\endgroup$ – Stephen Politzer-Ahles Jan 26 '15 at 10:42
  • $\begingroup$ You don't do epsilon corrections for the F when there are only two levels to your repeated measures. The assumption of sphericity can't be violated. $\endgroup$ – John Jan 27 '15 at 5:53
  • $\begingroup$ Hi John, thanks for your input. In this example (and in the actual dataset I'm hoping to analyze), the factor 'Contrast' has three levels. I also have some other planned analyses using another >2-level factor not shown here. $\endgroup$ – Stephen Politzer-Ahles Jan 28 '15 at 6:07
  • $\begingroup$ @Livius: Just an update, I tried out ezAnova and it did indeed take care of the issue (all I had to do was melt my wide-format data and translate my car::Anova formula into ezAnova's notation). I'm still curious about how to do this in car::Anova, but now that's more for curiosity's sake, since I can now get around the problem using ezAnova. $\endgroup$ – Stephen Politzer-Ahles Feb 15 '15 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.