I know this is a subject of controversy, but I'm not interested in why p-values and effect sizes are bad but how I can calculate the latter based on the lmer()
function. In psychology literally every supervisor wants to have $\eta^2$ or $\eta^2_{partial}$ reported in ANOVA results. So no room for idealism here.
I'm aware of calculating the effect size with the help of the car
and heplots
package, but calling this way beginner-unfriendly would be the understatement of the year.
Is there any way to calculate $\eta^2$ or $\eta^2_{partial}$ for a lmer()
anova (not the overall $R^2$ like one could get with sjstats::r2()
) or the residuals sum of squares to write a short function to calculate it myself?
For example, if anova(lmer(...))
returns an ANOVA output like this
Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
A 1090549 1090549 1 175 25.7756 9.747e-07 ***
B 36119 36119 1 175 0.8537 0.3568
I'd like to get something like this
eta^2
(Intercept) 0.95813226
A 0.16879768
B 0.03596987
aov
or similar, but if I recall right,anova()
returns a data frame, which is not consistent across different models. I think here is the problem why it's rather difficult to calculate eta squared from these objects. $\endgroup$ – Daniel Mar 22 '19 at 8:27aov
objects, but I also need it for repeated measure ANOVAs. I really like the syntax oflme4
but if theres no way to calculate eta squared I'll have to switch toez::ezANOVA()
. $\endgroup$ – j3ypi Mar 22 '19 at 8:58