Download presentation
Presentation is loading. Please wait.
1
Linear Mixed Modelling Using R
Francis Duah Maths Skills Centre, Academic Support Office
2
Session Outline When to conduct Linear Mixed Modelling
Differences between Linear Regression Modelling and Linear Mixed Modelling in R Packages for conducting Linear Mixed Modelling in R Formatting Repeated Measures Data for Analysis in R What are Random Effects and Fixed Effects Interpretation of the Linear Mixed Model Output from R
3
Resources for your ongoing learning
Gardeners Own The R Basics You Need to Know before Doing Linear Mixed Modelling University of Western Sydney Data Analysis and Visualisation in R Advanced topics in R Harvard University Data Science Services Regression Models and Multilevel Models in R Technical University of Denmark Analysis of correlated data in R
4
Excel Files to Copy Filenames clinicaltrial.csv placebostudy2.csv
5
Packages for Linear Mixed Modelling in R
Must include lme4 lmerTest car
6
Modelling What are Fixed Effects and Random Effects
7
Fixed Effects and Random
Random Effects Gender One age versus another Drug treatment administered or not Wet versus Dry Insecticide sprayed or not Nutrient added or not One country versus another Light versus shade Individual Parent Household Block within a field Split plot within a field Genotype
8
Modelling Fit Linear mixed models with Varying Intercept
Fit Linear mixed models with Varying Slope Fit Linear mixed models with Varying Intercept and Slope Interpret the Linear Mixed Model Output from R
9
Practical – Demonstration
Goal: To develop a LINEAR MIXED model TO INVESTIGATE THE EFFECT OF TREATMENT/ INTERVENTION ON OUTCOMES Fit a Linear Mixed Model to “clinical trial” data
10
Practical – Exercise or Homework
Goal: To develop a LINEAR MIXED model TO INVESTIGATE THE EFFECT OF TREATMENT/ INTERVENTION ON OUTCOMES on Fit a mixed linear model to “Placebo Study Two”
11
Assumptions of Linear Mixed Modelling
Check these by plotting residuals, the fitted values and the predicted random effects. Check these by plotting residuals, the fitted values and the predicted random effects. The covariance matrix does not dependent on the group The random effects are independent in different groups Within groups errors are independent of the random effects Within groups errors are independent with mean zero and variance
12
Take Home Message Practice and practice with authentic research data.
Seek advice from your supervisor. Consult the Maths Skills Centre at the earliest opportunity. Attend our PG Statistics Workshops.
13
Thank You for Listening
Keep in touch Francis Duah Maths Skills Centre, Academic Support Office
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.