Last updated June 18, 2019
In this workshop (May 16, 2018), I will introduce and demonstrate how to conduct ANOVAs and compute contrasts (including interaction contrasts) in R using the afex and emmeans packages.
- These SPSS
.sav
files: - R
- Optional: RStudio Desktop
- The following R packages:
haven
(for importing SPSS sav files)tidyverse
(for data manipulation and ggplotting)afex
(version 0.20-0 at least) (for running ANOVA)emmeans
(for contrasts and simple slopes)lm.beta
(for standardized regression coefficients)
Install these packages by running in the R command line:
install.packages(c("haven","afex","emmeans","tidyverse","lm.beta"))
The following vignettes are the basis of the demo:
- ANOVA with
afex
-
Contrasts
and interaction
contrasts,
and
more
with emmeans.
The demo consists of two parts: