1 Important messages from Bolger et al., 2019

One of the sacred cows of experimental psychology is that mean differences between levels of an experimentally manipulated factor provide evidence of the causal importance of that factor.

For example, if I am testing the effect of distraction on working memory performance, I might manipulate the loudness of background music during a computer-based digit span task in which each subject completes 12 trials. I might try three levels of music: none, quiet (50 dB), or loud (80 dB). Imagine that I run this experiment in 75 subjects, randomly assigning 25 to each music condition. Here are the condition means and SDs of number of digits recalled, averaging number of words per subject before computing the condition means.

Condition Mean SD
No music 7.2 1.4
Quiet 6.8 1.5
Loud 5.5 2.5

In this case, I might run a one-way ANOVA and observe the following:

digit_data <- mvrnorm(n=25, mu=c(7.2, 6.8, 5.5), Sigma=diag(c(1.4, 1.5, 2.5))^2, empirical=T) %>% as.data.frame() %>%
  setNames(c("none", "quiet", "loud")) %>% 
  pivot_longer(cols = everything(), names_to = "condition", values_to = "digit_span") %>%
  mutate(id=1:n(), condition=ordered(condition, levels=c("none", "quiet", "loud")))

aobj <- afex::aov_ez(id="id", dv="digit_span", between = "condition", data=digit_data)
## Contrasts set to contr.sum for the following variables: condition
summary(aobj)
num Df den Df MSE F ges Pr(>F)
condition 2 72 3.49 5.66 0.136 0.005
afex::afex_plot(aobj, x="condition")