5
$\begingroup$

Is there an issue with the output of the Huynh-Feldt correction when running an ANOVA for both between and within factors (mixed design) in R? My issue is that when I run a 'within-subject (only)' ANOVA using either the 'Anova' or 'ezANOVA' functions, the output for the Huynh-Feldt correction is the exact same I get when using SPSS. However when I run an ANOVA on a mixed design, and consider both between and within subject effects using either the 'Anova' or 'ezANOVA' functions, my Greenhouse-Geisser corrections match up to SPSS, but the Huynh-Feldt corrections are slightly off compared to the output from SPSS? Any reason why this could be? I appreciate any advice/help anyone could provide!

$\endgroup$
1
  • 2
    $\begingroup$ Any reason you haven't marked John's answer as correct? $\endgroup$ Commented Nov 24, 2011 at 19:43

1 Answer 1

7
$\begingroup$

If there were an error in Anova it would also be in ezANOVA because Mike Lawrence built ez on John Fox's Anova package. And the Anova package in turn uses the standard R anova command. R is getting this correct. Peter Dalgaard (pp.3-4) pointed out that SAS and SPSS get the H-F calculation wrong, and have for decades. It's because they use the original published formula and not the corrected equation (Lecoutre, 1991) that R uses.

(My speculation about why they haven't fixed it is similar to the reason Excel remains buggy... they have a greater obligation to major customers to be bug compatible than to be correct. Fixing this would be admitting they were wrong as well. Although, if it were done in 1992 it would have been reasonable. Now it's just a great argument for open source. Alternatively, they just might not care. I wonder if one simply tests it's output against the other?)

$\endgroup$
2
  • 4
    $\begingroup$ "We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet." - Anne H. Milley, director of technology product marketing at SAS $\endgroup$ Commented Nov 24, 2011 at 1:09
  • $\begingroup$ Thanks for the reply. I have not brought this up to my professor/advisor, but I will keep this in mind for future analysis. By the way, ezANOVA gives the same answer as Anova for the HF corrections. $\endgroup$ Commented Dec 7, 2011 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.