WatsonWoo / Practical-Applications-in-R-for-Psychologists

Lesson files for Practical Applications in R for Psychologists.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Practical Applications in R for Psychologists


Last updated 2021-01-12.

This Github repo contains all lesson files for Practical Applications in R for Psychologists. The goal is to impart students with the basic tools to process data, describe data (w/ summary statistics and plots), and the foundations of building, evaluating and comparing statistical models in R, focusing on linear regression modeling (using both frequentist and Bayesian approaches).

These topics were taught in the graduate-level course Advanced Research Methods for Psychologists (Psych Dep., Ben-Gurion University of the Negev, Fall semester, 2020), laying the foundation for the topic-focused courses (Spring semester):

Notes:

  • This repo contains only materials relating to Practical Applications in R. Though statistics are naturally discussed in many lessons, the focus is generally on the application and not on the theory.
  • Please note that some code does not work on purpose and without warning, to force students to learn to debug.

Setup

You will need:

  1. A fresh installation of R (preferably version 4.0 or above).
  2. RStudio IDE (optional, but recommended).
  3. The following packages, listed by lesson:
Lesson Packages
01 intro
02 data wrangling haven, tidyverse, readxl, dplyr, parameters, summarytools, psych, DescTools, finalfit, Hmisc, mice
03 plotting dplyr, ggplot2, tidyr
04 hypothesis testing and power psych, effectsize, BayesFactor, pwr, ggplot2
05 regression 101 effectsize, parameters, performance, ggeffects, psychTools
06 categorical predictors and model comparison dplyr, parameters, emmeans, ggeffects, BayesFactor, bayestestR, performance
07 moderation and curvilinear dplyr, parameters, performance, emmeans, ggeffects, interactions, ggplot2
08 generalized linear models parameters, performance, ggeffects, emmeans
09 assumption checks and violations ggeffects, performance, ggResidpanel, parameters, permuco, insight
10 ANOVA afex, emmeans, effectsize, tidyr, car, parameters
11 mediation mediation

(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", "BayesFactor", "bayestestR", "car", "DescTools", "dplyr",
  "effectsize", "emmeans", "finalfit", "ggeffects", "ggplot2",
  "ggResidpanel", "haven", "Hmisc", "insight", "interactions",
  "mediation", "mice", "parameters", "performance", "permuco",
  "psych", "psychTools", "pwr", "readxl", "summarytools", "tidyr", "tidyverse"
)

install.packages(pkgs, dependencies = TRUE)
Package Versions

The package versions used here:

  • afex 0.28-0 (CRAN)
  • BayesFactor 0.9.12-4.2 (CRAN)
  • bayestestR 0.8.0.1 (Dev)
  • car 3.0-10 (CRAN)
  • DescTools 0.99.39 (CRAN)
  • dplyr 1.0.2 (CRAN)
  • effectsize 0.4.1.2 (Dev)
  • emmeans 1.5.2-1 (CRAN)
  • finalfit 1.0.2 (CRAN)
  • ggeffects 1.0.1 (Dev)
  • ggplot2 3.3.2 (CRAN)
  • ggResidpanel 0.3.0 (CRAN)
  • haven 2.3.1 (CRAN)
  • Hmisc 4.4-2 (CRAN)
  • insight 0.11.1.1 (Dev)
  • interactions 1.1.3 (CRAN)
  • mediation 4.5.0 (CRAN)
  • mice 3.12.0 (CRAN)
  • parameters 0.10.1.1 (Dev)
  • performance 0.6.0 (CRAN)
  • permuco 1.1.0 (CRAN)
  • psych 2.0.9 (CRAN)
  • psychTools 2.0.8 (CRAN)
  • pwr 1.3-0 (CRAN)
  • readxl 1.3.1 (CRAN)
  • summarytools 0.9.6 (CRAN)
  • tidyr 1.1.2 (CRAN)
  • tidyverse 1.3.0 (CRAN)

About

Lesson files for Practical Applications in R for Psychologists.

License:Other


Languages

Language:R 100.0%