Last updated 2022-01-31.
This Github repo contains all lesson files for Analysis of Factorial
Designs foR Psychologists. 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.
These topics were taught in the graduate-level course Analyses of Variance (Psych Dep., Ben-Gurion University of the Negev, Spring, 2019). This course assumes basic competence in R (importing, regression modeling, plotting, etc.), along the lines of Practical Applications in R for Psychologists.
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 4.1 or above). - RStudio IDE (optional, but recommended).
- The following packages, listed by lesson:
(Bold denotes the first lesson in which the package was used.)
You can install all the packages used by running:
# in alphabetical order:
pkgs <- c(
"afex", "bayestestR", "car", "dplyr", "effectsize", "emmeans",
"ggeffects", "lme4", "parameters", "patchwork", "performance",
"permuco", "tidyr"
)
install.packages(pkgs, repos = c("https://easystats.r-universe.dev", getOption("repos")))
Package Versions
Run on Windows 10 x64 (build 22000), with R version 4.1.1.
The packages used here:
afex
1.0-1 (CRAN)bayestestR
0.11.5.1 (Local version)car
3.0-12 (CRAN)dplyr
1.0.7 (CRAN)effectsize
0.4.5-4 (Local version)emmeans
1.7.1-1 (CRAN)ggeffects
1.1.1 (CRAN)lme4
1.1-27.1 (CRAN)parameters
0.16.0 (CRAN)patchwork
1.1.1 (CRAN)performance
0.8.0.1 (https://easystats.r-universe.dev)permuco
1.1.1 (CRAN)tidyr
1.1.4 (CRAN)