dgromer / apa

Format output of statistical tests in R according to APA guidelines
GNU General Public License v3.0
28 stars 2 forks source link

Not applying DFs correction from ANOVA table #13

Closed tombeesley closed 3 years ago

tombeesley commented 3 years ago

I am potentially seeing some odd behaviour of the wrapper function apa on an ANOVA table generated by aov_car. Some of the effects in the ANOVA table that have corrected DFs are reported with those corrected DFs in the apa command, while others are reported without the corrected DFs with the apa command:

Screenshot 2021-08-16 150942

I don't understand what is going on here. I can correct it by using "force_sph_corr = TRUE" but I'm not sure what is going on and why this would be necessary.

dgromer commented 3 years ago

afex applies the Greenhouse-Geisser correction to within-subject effects by default, irrespective of whether Mauchly's test indicates a violation of sphericity or not. anova_apa(), which is called by apa(), on the other hand, only applies the correction to those effects for which Mauchly's test indicates a violation of sphericity. If you want to have the same behavior as afex you indeed need to set the force_sph_corr argument to TRUE.

tombeesley commented 3 years ago

Ah ok. I didn't realise that was the default behaviour of afex. thanks.