Hierarchical and Mixed Effects Models in R
Learn to fit hierarchical and mixed-effects models in R for nested, binary, count and repeated-measures data, using lmer and real datasets.
Hierarchical models are built for data where observations sit inside groups, such as students nested within classrooms and schools, or the same subjects measured again and again over time. That kind of data has more structure than a standard linear regression can describe. Working in R, you learn what a random effect is, when a group deserves its own intercept or slope, and how the same approach extends to binary responses, count data and measurements collected at intervals.
What You Will Achieve
- Choose between fixed and random effects for grouped data such as students within schools
- Fit an lmer model in R, extract its coefficients and report what the output means
- Model binary and count responses with generalized linear mixed-effect regressions and interpret odds ratios
- Analyze data collected from subjects over time as a mixed-effect model and compare it with a repeated measures ANOVA
Program Overview
Hierarchical Data and Random Effects
A nested student test-score dataset shows when a mixed-effect model is needed and how the parts of a regression carry over.
- Multi-level data across classrooms and schools
- Intercepts, slopes and multiple regression
- Random-effect intercepts and slopes
- Building and interpreting a school model
Linear and Generalized Mixed Effect Models
Birth rates and Maryland crime data introduce linear mixed models, then toxicology, click-through and chlamydia data extend them to non-normal errors.
- Fixed effects and uncorrelated random-effect slopes
- Reporting outputs, p-value debates and ANOVA model comparison
- Logistic and Poisson regression review
- Binomial and count data with odds ratios
Repeated Measures Over Time
Repeated-measures analysis is treated as a special case of mixed-effect modeling, using sleep study data and New York state hate crime data.
- Paired t-tests and repeated measures ANOVA
- A linear mixed-effect model of sleep study data
- A generalized model of hate crime counts through time
Certificate Awarded (Paid)
Job Outlook
Mixed-effects models are used wherever data arrives in groups or repeated measurements, including education research, public health, toxicology, marketing analysis and crime statistics.
Good for: R users analyzing grouped or repeated data, such as test scores nested in schools or sleep study subjects tracked over time, who want a working method for random effects.
Keep in mind: Several exercises use sensitive public records, including chlamydia counts by age group and county and hate crime data from New York state, alongside Maryland crime figures.
Bottom line: A worked path through random effects in R that shows paired t-tests and repeated measures ANOVA as special cases of mixed-effect models.
Frequently Asked Questions
Which R function fits the mixed models in this course?
The linear mixed models are built with lmer. Lessons compare its print and summary output, show how to extract coefficients, and display the fitted results so they can be reported clearly.
What datasets appear in the exercises?
The exercises draw on student test scores, birth rates, Maryland crime records, toxicology data, a marketing example, internet click-throughs, chlamydia cases by age group and county, a sleep study, and New York state hate crime data.
How does the course handle statistical inference for mixed models?
Using the Maryland crime data, lessons cover rescaling slopes, null hypothesis testing, the controversies around p-values, and comparing models with ANOVA, so you can judge which mixed model fits the data better.
How are repeated measures connected to mixed-effect models?
Repeated-measures analysis is presented as a special case of mixed-effect modeling. After a review of paired t-tests and repeated measures ANOVA, a linear mixed model examines sleep study data and a generalized one tracks hate crime data through time.


There are no reviews yet.