Skip to content

Lesson files used in the Analysis of Factorial Designs for Psychologists - Practical Applications in R, taught at Ben-Gurion University on the Negev

License

Notifications You must be signed in to change notification settings

deborahapthorp/Analysis-of-Factorial-Designs-foR-Psychologists

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analysis of Factorial Designs foR Psychologists


Last updated 2020-07-30.

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.

Setup

You will need:

  1. A fresh installation of R (preferably version 3.6 or above).
  2. RStudio IDE (optional, but recommended).
  3. The following packages, listed by lesson:
Lesson Packages
01 ANOVA made easy tidyr, afex, emmeans, ggplot2, ggbeeswarm
02 ANCOVA afex
03 analyzing interactions dplyr, afex, emmeans, AMCP, ggplot2
04 custom contrasts afex, emmeans
05 effect sizes afex, emmeans, effectsize, dplyr
06 assumption check and non-parametric tests afex, qqplotr, ggResidpanel, permuco, emmeans, car
07 multiple comparisons afex, emmeans
08 Bayesian ANOVA (and accepting the null) afex, BayesFactor, bayestestR, dplyr, patchwork, ggplot2, emmeans, effectsize, see
09 ANOVA vs (G)LMMs afex, emmeans, patchwork

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.27-2"      "1.0.0" "0.9.12-4.2"      "0.7.2"      "3.0-8"      "1.0.0" 
##   effectsize      emmeans   ggbeeswarm      ggplot2 ggResidpanel    patchwork 
##      "0.3.2"      "1.4.8"      "0.6.0"      "3.3.2"      "0.3.0"      "1.0.1" 
##      permuco      qqplotr          see        tidyr 
##      "1.1.0"      "0.0.4"      "0.5.2"      "1.1.0"

About

Lesson files used in the Analysis of Factorial Designs for Psychologists - Practical Applications in R, taught at Ben-Gurion University on the Negev

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%