Initial setup

rm(list=ls())
library(ggplot2)
library(effects)
library(effsize)
rnd = function(x,digits=2){ return(format(round(x,digits),nsmall=digits)) }
load("interaction_datasets.RData")
tsz=25

Fully open code at: https://github.com/psicostat/workshops/tree/main/Interaction%20introduction%202024




WHAT’S IN A “Cohen’s f”?

Cohen’s f is often used for expressing effect size in interactions. General formula for Cohen’s f is like this:

\[Cohen's f = \sqrt{\frac{R^2}{1 - R^2}}\]

However, for interactions we should consider what is added by the interaction alone (above and beyond the main effects):

\[Cohen's f = \sqrt{\frac{R^2_1 - R^2_0}{1 - R^2_1}}\]

Cohen’s f = 0.25 (about Cohen’s f 2 = 0.06) is often taken as “medium” effect size. In fact, Cohen’s f = 0.40 (about Cohen’s f 2 = 0.15) is also taken as “medium” sometimes. Note that Cohen’s f = 0.25 requires R2 = 0.06, corresponding to about r = 0.24, while Cohen’s f = 0.40 requires R2 = 0.15, corresponding to about r = 0.39. So, it makes more sense to say that Cohen’s f = 0.25 is “medium”.

Anyways… what does that mean in actual interactions? The problem is that there are infinite cases that lead to the same effect size (e.g., Cohen’s f) in interactions.

All examples below will present about Cohen’s f ≈ 0.25 (Cohen’s f 2 ≈ 0.06).

This is also a useful resource: https://lakens.github.io/statistical_inferences/06-effectsize.html#effect-sizes-for-interactions