A Hands-On Crash Course in R

Hannah Lam and Veranika Puhacheuskaya, University of Alberta

In recent years, linear mixed modeling has become one of the primary forms of analysis for experimental data. This hands-on course equips participants with both the conceptual understanding and practical skills needed to perform mixed-effects regression (linear and logistic) using lme4 in R. Participants will develop confidence in 1) data verification and visualization; 2) implementing linear mixed-effects regression; and 3)
interpreting and reporting the results. Tentative course topics:

  • Introduction to the course
  • Introduction to linear and linear mixed models
  • Building, fitting, and interpreting a linear mixed model:
  • Random & fixed effects (types of random effects; crossed random effects vs. nested random effects)
  • Random slopes
  • Categorical predictors and variable coding (dummy, sum, contrast)
  • Emmeans and post hoc analysis
  • Troubleshooting and convergence issues (common warnings; handling non-convergence; overfitting vs. underfitting)
  • Model diagnostics & assumptions (checking assumptions – residuals, normality, and homoscedasticity; solutions to violated assumptions; checking fit and validity)
  • Model comparison
  • Logistic mixed models and other types of mixed models
  • How to report your model for a journal paper
  • Hands-on exercises (our data or your data)

Prerequisites:
Basic knowledge of R
Please bring your own laptop with R and RStudio installed
https://posit.co/download/rstudio-desktop/