QCBS R Workshop Series
Preface
0.1
Code of conduct
0.1.1
Expected behaviour
0.1.2
Unacceptable behaviour
0.2
Contributors
0.3
Contributing
Linear mixed models (LMM) in
R
1
Learning objectives
2
Preparing for the workshop
3
Why choose mixed models?
4
Starting with a question
4.1
Challenge 1
5
Analyzing the data
5.1
Option 1: Separate
5.2
Option 2: Lump everything together
5.3
Option 3: Is there a third option?
6
Fixed vs. random effects
6.1
Fixed effects: deterministic processes
6.2
Random effects: stochastic processes
7
How do LMMs work?
7.1
Parameters are varied
Intercepts:
Slopes:
7.2
Data structure is taken into account
7.3
Challenge 2
Implementing LMM in
R
8
Mixed model protocol
9
Step 1.
A priori
model building
9.1
Check data structure
9.2
Check collinearity
9.3
Challenge 3
9.4
Consider scale
9.5
Do you need a LMM?
10
Step 2. Code potential models and model selection
10.1
Estimation methods
10.2
Different model structures
10.3
Challenge 4
10.4
Challenge 5
10.5
Comparing models
11
Step 3. Model validation
11.1
1. Check the homogeneity of the variance
11.2
2. Check the independence of the model residuals with each covariate
11.3
3. Check the normality of the model residuals
12
Step 4. Interpretation and visualization
12.1
Interpreting our model
12.2
Challenge 6
12.3
Challenge 7
12.4
Challenge 8
Generalized linear mixed models (GLMM) in
R
13
Introduction to GLMM
14
Choose an error distribution
15
Poisson GLMM
16
Negative binomial GLMM
17
Poisson-lognormal GLMM
17.1
Random intercepts
17.2
Parameter plots
18
Final model
18.1
Challenge 9
Additional LMM and GLMM resources
19
Additional resources
20
References
QCBS R Workshop Series
Workshop 7: Linear and generalized linear mixed models (LMM and GLMM)
Chapter 8
Mixed model protocol
Step 1.
A priori
model building and data exploration
Step 2.
Code potential models and model selection
Step 3.
Model validation
Step 4.
Model interpretation and visualization