Skip to content

mattansb/ANOVA-and-Contrasts-in-R

Repository files navigation

ANOVA and Contrasts in R

Last updated June 18, 2019

Programme

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.

What you’ll need to play along

  • These SPSS .sav files:
  • R
  • 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"))

Reading Materials

The following vignettes are the basis of the demo:
- ANOVA with afex
- Contrasts and interaction contrasts, and more with emmeans.

The Demo

The demo consists of two parts:

  1. Running Anovas and analyzing effects and interactions with contrasts (planned and post-hoc).
  2. Analyzing regression interactions.

About

demo of afex and emmeans

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published