Last updated 2020-06-22.
This Github repo contains all lesson files used in the graduate-level course: Analysis of Factorial Designs foR Psychologists - Practical Applications in R, taught at Ben-Gurion University on the Negev (spring 2019 semester). This course assumes basic competence in R (importing, regression modeling, plotting, etc.), a long the lines of the prerequisite course, Advanced Research Methods foR Psychologists, which can be found here.
The goal is to impart students with the basic tools to fit and evaluate
statistical models for factorial designs (w/ plots) using
afex
, and and conduct follow-up
analyses (simple effects, planned contrasts, post-hoc test; w/ plots)
using emmeans
.
Although the focus is on ANOVAs, the materials regarding follow-up
analyses (~80% of the course) are applicable to linear mixed models,
and even regression with factorial predictors.
Notes:
- This repo contains only materials relating to Practical Applications in R, and does not contain any theoretical or introductory materials.
- Please note that some code does not work on purpose, to force students to learn to debug.
You will need:
- A fresh installation of
R
(preferably version 3.6 or above). - RStudio (optional - but I recommend using an IDE).
- The following packages, listed by lesson:
You can install all the packages used by running:
# in alphabetical order:
pkgs <- c(
"afex", "AMCP", "BayesFactor", "bayestestR", "car", "dplyr",
"effectsize", "emmeans", "ggbeeswarm", "ggplot2", "ggResidpanel",
"patchwork", "permuco", "qqplotr", "see", "tidyr"
)
install.packages(pkgs, dependencies = TRUE)
The package versions used here:
## afex AMCP BayesFactor bayestestR car dplyr
## "0.28" "1.0.0" "0.9.12-4.2" "0.6.0.1" "3.0-8" "1.0.0"
## effectsize emmeans ggbeeswarm ggplot2 ggResidpanel patchwork
## "0.3.1.1" "1.4.7" "0.6.0" "3.3.1" "0.3.0" "1.0.0"
## permuco qqplotr see tidyr
## "1.1.0" "0.0.4" "0.5.0.1" "1.1.0"