• Mixed Models with R
  • Introduction
    • Overview
      • Goals
      • Prerequisites
    • Data and Exercises
    • Key packages
  • Mixed Models
    • Terminology
    • Kinds of Structure
    • Random Intercepts Model
    • Example: Student GPA
    • The Standard Regression Model
    • The Mixed Model
      • Initial depiction
      • As a multi-level model
    • Application
      • Initial visualization
      • Standard regression
      • Regression by cluster
      • Running a mixed model
    • Cluster Level Covariates
    • Summary of Mixed Model Basics
    • Exercises for Starting Out
      • Sleep
      • Adding the cluster-level covariate
      • Simulating a mixed model
  • More Random Effects
    • Application
    • Comparison to many regressions
    • Visualization of effects
    • Categorical Features
    • Summary of Random Slopes
    • Exercises for Random Slopes
  • Common Extensions
    • Additional Grouping Structure
      • Cross-classified models
      • Hierarchical structure
      • Crossed vs. nested
    • Residual Structure
      • Heterogeneous variance
      • Autocorrelation
    • Generalized Linear Mixed Models
    • Exercises for Extensions
      • Sociometric data
      • Patents
  • Issues
    • Variance Accounted For
    • Common Alternatives to Mixed Models
      • Growth curve models
    • Sample Sizes
      • Small number of clusters
      • Small number of observations within clusters
      • Balanced/Missing values
      • Big data
    • Model Comparison
    • Convergence
  • Bayesian Approaches
    • Priors
      • Fixed effects
      • Variance components
    • Demonstration
    • Example Models
    • Beyond the Model
  • Going Further
    • Other Distributions
    • Other Contexts
    • Nonlinear Mixed Effects Models
    • Connections
  • Summary
  • Supplemental
    • A Comparison to Latent Growth Curve Models
      • Random effects as latent variables
      • Random effects in SEM
      • Running a growth curve model
      • Random intercepts
      • Random intercepts and slopes
      • Random effects with heterogeneous variances
      • Other covariates
      • Some differences between mixed models and growth curves
      • Recommended packages that can do growth curve models
      • Summary of LGC
    • Correlation Structure Revisited
      • Summary of residual correlation structure
  • Appendix
    • Data
    • Programming languages
      • R
      • Python
      • Julia
      • Proprietary
    • Reference texts and other stuff
  • MC logo

Mixed Models with R

Mixed Models with R

Getting started with random effects

Michael Clark
m-clark.github.io