Mixed models:
Misconceptions, pitfalls, and many opportunities
4th Channel Network Conference: St-Andrews, July 3-5, 2013
Geert Verbeke
I-Biostat: International Institute for Biostatistics and statistical Bioinformatics
Katholieke Universiteit Leuven & Universiteit Hasselt, Belgium
http://perswww.kuleuven.be/geert verbeke
Outline
• Mixed models in action
• Random-effects assumptions
• Mixed models in large data sets
4th Channel Network Conference: St-Andrews, July 3-5, 2013 1
I will focus on . . .
• Model formulation
• Parameter interpretation
• Misconceptions
• Problems often encountered in practice
• Random-effects distributional assumptions
• Issues with large data sets
4th Channel Network Conference: St-Andrews, July 3-5, 2013 2
I will NOT talk about . . .
• Estimation methods
• Inferential procedures
• Asymptotics
• Algorithms
• Model selection
• . . .
4th Channel Network Conference: St-Andrews, July 3-5, 2013 3
Mixed models in action
4th Channel Network Conference: St-Andrews, July 3-5, 2013 4
The Diabetes Project Leuven
(Borgermans et al. 2009)
• The impact of offering GP’s assistance of a diabetes care team,consisting of a nurse educator, a dietician, an ophthalmologist and aninternal medicine doctor, for the treatment of their diabetes patients
• GP’s randomized to one of two programs:
. LIP: Low Intervention Program (group A)
. HIP: High Intervention Program (group R)
• We consider the HIP group only
. 61 GP’s with 1577 patients
. # patients per GP between 5 and 138, with median of 47
4th Channel Network Conference: St-Andrews, July 3-5, 2013 5
• Patients were measured twice:
. When the program was initiated (time T0)
. After one year (time T1)
• HbA1c: glycosylated hemoglobin:
. Molecule in red blood cells that attaches to glucose (blood sugar)
. High values reflect more glucose in blood
. Gives a good estimate of how well diabetes has been managed overlast 2 or 3 months
. Non-diabetics have values between 4% and 6%
. HbA1c above 7% means diabetes is poorly controlled, implyinghigher risk for long-term complications.
4th Channel Network Conference: St-Andrews, July 3-5, 2013 6
A logistic mixed model
• Dichotomized version of HbA1c:
Y =
1 if HbA1c < 7%
0 if HbA1c ≥ 7%
• A three-level logistic mixed model:
Yijk ∼ Bernoulli(πijk)
logit(πijk) = log(
πijk
1−πijk
)= β0 + β1tk + ai + bj(i),
ai ∼ N (0, σ2GP ), bj(i) ∼ N (0, σ2
PAT )
4th Channel Network Conference: St-Andrews, July 3-5, 2013 7
Fixed effects
Effect Estimate (se) p-value
Intercept β0: 0.1662 (0.0796) 0.0410
Time β1: 0.6240 (0.0812) < .0001
“Fixed effects model systematic trends”
6=“Fixed effects model average trends”
4th Channel Network Conference: St-Andrews, July 3-5, 2013 8
Logistic random-intercepts model
E[Yijk|ai, bj(i)
]= πijk =
exp[β0 + β1tk + ai + bj(i)
]
1 + exp[β0 + β1tk + ai + bj(i)
]
4th Channel Network Conference: St-Andrews, July 3-5, 2013 9
Average subject treated by average GP
E[Yijk|ai = 0, bj(i) = 0
]=
exp [β0 + β1tk + 0 + 0]
1 + exp [β0 + β1tk + 0 + 0]
4th Channel Network Conference: St-Andrews, July 3-5, 2013 10
Average evolution
E[Yijk
]= E
exp[β0 + β1tk + ai + bj(i)
]
1 + exp[β0 + β1tk + ai + bj(i)
]
4th Channel Network Conference: St-Andrews, July 3-5, 2013 11
Conclusion
Average evolution 6= Evolution average subject
• Parameters in the mixed model have a subject-specific interpretation,not a population-averaged one.
• Calculation of the marginal average population requires computation of∫∫
exp[β0 + β1tk + ai + bj(i)
]
1 + exp[β0 + β1tk + ai + bj(i)
]
f (ai)f (bj(i)) daidbj(i)
4th Channel Network Conference: St-Andrews, July 3-5, 2013 12
Variance components
Effect Estimate (se) p-value
Between GP variance σ2GP : 0.1399 (0.0528) ?
Between patient variance σ2PAT : 1.1154 (0.1308) ?
!!! Tests for variance components not standard !!!
4th Channel Network Conference: St-Andrews, July 3-5, 2013 13
Random effects predictions
4th Channel Network Conference: St-Andrews, July 3-5, 2013 14
Scatterplot of random effects predictions
4th Channel Network Conference: St-Andrews, July 3-5, 2013 15
• For each GP, we observe at most 7 different patient predictions.
• These correspond to the 7 possible response profiles:0 −→ 0, 0 −→ 1, 1 −→ 1, 0 −→ ·, 1 −→ ·, · −→ 0, and · −→ 1.
• The negative trends are also a side effect of the discrete nature of theoutcomes.
• Two patients, j1 and j2, treated by different GP’s, i1 and i2, with thesame response profile should get identical predicted probabilities
⇒ ai1 + bj1(i1)= ai2 + bj2(i2)
⇒ ai + bj(i) is constant
⇒ Observed non-normality not necessarily problematic
4th Channel Network Conference: St-Andrews, July 3-5, 2013 16
The reverse ?
• Simulation of 1000 subjects with 5 measurements each
• Histogram of true random intercepts:
4th Channel Network Conference: St-Andrews, July 3-5, 2013 17
• Histogram of predictions assuming normality:
• The normal “prior” forces the predictions to satisfy normality
4th Channel Network Conference: St-Andrews, July 3-5, 2013 18
Conclusion
(Verbeke & Lesaffre 1996)
The normality assumption for random effectscannot be tested using their predictions
⇓
Other techniques needed
4th Channel Network Conference: St-Andrews, July 3-5, 2013 19
Random-effects assumptions
4th Channel Network Conference: St-Andrews, July 3-5, 2013 20
The general mixed model
• Conditional model for vector yi of repeated measurements:
yi|bi ∼ Fi(bi), with density fi(yi|bi),
possibly depending on unknown parameters.
• Marginal model, assuming mixing distribution G for bi:
yi with density fi(yi|G) =
∫fi(yi|b)dG(b)
• Inference based on marginal log-likelihood:
`(G) =
N∑
i=1
ln[fi(yi|G)]
4th Channel Network Conference: St-Andrews, July 3-5, 2013 21
The importance of G: Literature
• Neuhaus, Hauck, and Kalbfleisch (1992)• Butler and Louis (1992)• Magder and Zeger (1996)• Verbeke and Lesaffre (1996, 1997)• Heagerty and Kurland (2001)• Zhang and Davidian (2001)• Chen, Zhang, and Davidian (2002)• Agresti, Caffo, and Ohman-Strickland (2004)• Ghidey, Lesaffre, and Eilers (2004)• Ritz (2004)• Pan and Lin (2005)• Tchetgen and Coull (2006)• Litiere, Alonso, and Molenberghs (2007, 2008)• Huang (2008)• Muthen and Asparouhov (2009)• Tsonaka, Verbeke, and Lesaffre (2009)• . . .
4th Channel Network Conference: St-Andrews, July 3-5, 2013 22
The importance of G: Conclusions
• Mixed feelings: Sometimes important, sometimes not
• Some aspects of inference sensitive, some not
• Some models sensitive, some not
• Proposed solutions:
. ‘Omnibus’ goodness-of-fit testsProblem: No specific alternative
. Compare model to extended versionsProblem: Lack of software
4th Channel Network Conference: St-Andrews, July 3-5, 2013 23
Our aim
To develop a simple, widely applicable, diagnostic tool tocheck the random-effects assumption in any mixed model
To develop a simple, widely applicable, diagnostictool which indicates how the random-effects
model can be improved
Focus on models with (multivariate) normal random effects,but equally well applicable to other latent variable models
4th Channel Network Conference: St-Andrews, July 3-5, 2013 24
General idea
• Suppose a mixed model with specific parametric assumption for G hasbeen fitted, maximizing the marginal log-likelihood `(G)
• Question:
Can `(G) be increased considerably by replacing G byanother mixing distribution H ?
• Ideal situation:
G maximizes `(G) over all possible mixing distributions G
4th Channel Network Conference: St-Andrews, July 3-5, 2013 25
The gradient function and its properties
∆(G, b) =1
N
∑
i
fi(yi|b)
fi(yi|G)
G maximizes `(G) over all G
if and only if
∆(G, b) does not exceed 1.
Moreover, ∆(G, b) equals 1 in support points of G
4th Channel Network Conference: St-Andrews, July 3-5, 2013 26
Implications for checking normality
(Verbeke & Molenberghs, 2013)
• Graphical check for goodness-of-fit:
(1) Fit mixed model under normality for G
(2) Check whether ∆(G, b) = 1N
∑i
fi(yi|b)
fi(yi|G)≡ 1
• Attention can be restricted to region I of unique modes of all fi(yi|b)
• Pointwise confidence band around ∆(G, b) possible using CLT
4th Channel Network Conference: St-Andrews, July 3-5, 2013 27
Application: The onychomycosis trial
• De Backer et al (Brit. J. Dermatology, 1996), Verbeke and Molenberghs(Springer, 2000), Molenberghs and Verbeke (Springer, 2005).
• A randomized, double-blind, parallel group, multicenter longitudinalstudy for the comparison of two oral treatments (A and B) for toenaildermatophyte onychomycosis (TDO)
• 146 and 148 subjects, measured at time-points:
. During treatment: Month 0, 1, 2, 3
. After treatment: Month 6, 9, 12
• Outcome: Severity of infection (0: not severe, 1: severe)
4th Channel Network Conference: St-Andrews, July 3-5, 2013 28
Observed proportions
4th Channel Network Conference: St-Andrews, July 3-5, 2013 29
Logistic mixed model
yij ∼ Bernoulli(πij), logit(πij) = β0 + bi + β1Ti + β2tj + β3Titj
Normal model
Linear predictor: β0 -1.6306 (0.4345)
β1 -0.1146 (0.5852)
β2 -0.4041 (0.0460)
β3 -0.1613 (0.0718)
Mixing distribution: σ 4.0133 (0.3763)
−2` 1247.8
4th Channel Network Conference: St-Andrews, July 3-5, 2013 30
Gradient function
4th Channel Network Conference: St-Andrews, July 3-5, 2013 31
Logistic mixture mixed model
• Clear evidence for non-normality
• A more flexible model:
bi ∼ π1N (µ1, σ2) + π2N (µ2, σ
2) + π3N (µ3, σ2)
with π1 + π2 + π3 = 1 and π1µ1 + π2µ2 + π3µ3 = 0
• Multimodal as well as unimodal, symmetric as well as skewed
4th Channel Network Conference: St-Andrews, July 3-5, 2013 32
Gradient function
4th Channel Network Conference: St-Andrews, July 3-5, 2013 33
Results
Normal model Mixture model
Linear predictor: β0 -1.6306 (0.4345) -1.5160 (0.4854)
β1 -0.1146 (0.5852) 0.4479 (0.4306)
β2 -0.4041 (0.0460) -0.3992 (0.0466)
β3 -0.1613 (0.0718) -0.1562 (0.0758)
Mixing distribution: σ 4.0133 (0.3763) 0.8561 (0.1889)
µ1 -2.5617 (0.4831)
µ2 2.7744 (0.3146)
µ3 9.5282 (1.2788)
π1 0.5770 (0.0422)
π2 0.3779 (0.0426)
π3 0.0451 (0.0129)
−2` 1247.8 1219.5
4th Channel Network Conference: St-Andrews, July 3-5, 2013 34
Fitted mixing distributions G
4th Channel Network Conference: St-Andrews, July 3-5, 2013 35
Components in mixing distribution
• Component 1: µ1 = −2.5617, π1 = 57.70%
Patients with no severe infections at all, 163/294 = 55.44%
• Component 2: µ2 = 2.7744, π2 = 37.79%
Patients with non-constant profiles, 115/294 = 39.12%
• Component 3: µ3 = 9.5282, π3 = 4.51%
Patients with only severe infections, 16/294 = 5.44%
4th Channel Network Conference: St-Andrews, July 3-5, 2013 36
Gradient function to check G
• Applicable to any type of mixed model
• Applicable to check any G (mixtures, latent class, . . . )
• No computations needed additional to the fitting of the mixed model
• Straightforward multivariate extension
• Ongoing:
. Construction of a formal test based on the gradient
. Studying operating characteristics
4th Channel Network Conference: St-Andrews, July 3-5, 2013 37
Mixed models in large data sets
4th Channel Network Conference: St-Andrews, July 3-5, 2013 38
Large data sets
Measurements → 1 2 3 4 n
↓ Subjects#1 • • • • • • • • • • • • • • • • • • •#2 • • • • • • • • • • • • • • • • • • •#3 • • • • • • • • • • • • • • • • • • •#4 • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •
#N • • • • • • • • • • • • • • • • • • •
N large, or n large, or both ?
4th Channel Network Conference: St-Andrews, July 3-5, 2013 39
Situations leading to large data sets
• N large: Observational longitudinal data
• n large: Statistical genetics / functional data analysis
• N and n large: Large multivariate longitudinal data
4th Channel Network Conference: St-Andrews, July 3-5, 2013 40
Large N
Measurements → 1 2 3 4 n
↓ Subjects#1 • • • • • • • • • • • • • • • • • • •#2 • • • • • • • • • • • • • • • • • • •#3 • • • • • • • • • • • • • • • • • • •#4 • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •
#N • • • • • • • • • • • • • • • • • • •
{
{{
=⇒ Independent sub-samples
4th Channel Network Conference: St-Andrews, July 3-5, 2013 41
Large n
Measurements → 1 2 3 4 n
↓ Subjects#1 • • • • • • • • • • • • • • • • • • •#2 • • • • • • • • • • • • • • • • • • •#3 • • • • • • • • • • • • • • • • • • •#4 • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •
#N • • • • • • • • • • • • • • • • • • •︸ ︷︷ ︸ ︸ ︷︷ ︸ ︸ ︷︷ ︸
=⇒ Dependent sub-samples
4th Channel Network Conference: St-Andrews, July 3-5, 2013 42
The general split sample idea
(Molenberghs, Verbeke, & Iddi 2011)
• Split sample in M sub-samples
• Analyse each sub-sample separately
• Combine results in appropriate way
• Inference follows from pseudo likelihood ideas
4th Channel Network Conference: St-Andrews, July 3-5, 2013 43
Pseudo likelihood
(Arnold & Strauss 1991)
• (Log-)Likelihood:
`(Θ) =∑
i
`(yi|Θ), Θd→ N (Θ, I−1
0 )
• Pseudo (log-)likelihood:
p`(Θ) =∑
i
∑
s
δs `(yi(s)|Θ), Θ
d→ N (Θ, I−1
0 I1I−10 )
4th Channel Network Conference: St-Andrews, July 3-5, 2013 44
Example: Multivariate longitudinal data
• Threshold sound pressure levels (dB), on both ears,11 frequencies: 125 → 8000 Hz
• Observations from 603 males, with up to 15 obs./subject.
× 603
4th Channel Network Conference: St-Andrews, July 3-5, 2013 45
Linear mixed models for hearing data
• Linear mixed model for one outcome:
Yi(t) = (β1 + β2 Fagei + β3 Fage2i + ai)
+ (β4 + β5 Fagei + bi) t + β6 visit1(t) + εi(t)
• Joint model:
Y1i(t) = µ1(t) + a1i + b1it + ε1i(t)
Y2i(t) = µ2(t) + a2i + b2it + ε2i(t)
...
Y22i(t) = µ22(t) + a22i + b22it + ε22i(t)
4th Channel Network Conference: St-Andrews, July 3-5, 2013 46
Joint model
• Distributional assumptions:
(a1i, a2i, . . . , a22i, b1i, b2i, . . . , b22i)′ ∼ N (0, D44×44)
(ε1i(t), ε1i(t), . . . , ε1i(t))′ ∼ N (0, Σ22×22) , for all t
• Full multivariate joint model
. 44 × 44 covariance matrix for random effects
. 22 × 22 covariance matrix for error components
. 990 + 253 = 1243 covariance parameters
=⇒ Computational problems!
4th Channel Network Conference: St-Andrews, July 3-5, 2013 47
Pairwise approach
(Fieuws & Verbeke 2006)
• Fit all 231 bivariate models using (RE)ML (SAS PROC MIXED):
(Y1, Y2), (Y1, Y3), . . . , (Y1, Y22), (Y2, Y3), . . . , (Y2, Y22), . . . , (Y21, Y22)
• Equivalent to maximizing pseudo (log-)likelihood:
p`(Θ) = `(Y1, Y2|Θ1,2) + `(Y1, Y3|Θ1,3) + . . . + `(Y21, Y22|Θ21,22)
• Inferences follow from pseudo likelihood theory
4th Channel Network Conference: St-Andrews, July 3-5, 2013 48
Overlapping sub-samples
Measurements → 1 2 3 n
↓ Subjects#1 • • • • • • • • • • • • • • • • • • •#2 • • • • • • • • • • • • • • • • • • •#3 • • • • • • • • • • • • • • • • • • •#4 • • • • • • • • • • • • • • • • • • •
• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • •
#N • • • • • • • • • • • • • • • • • • •︸ ︷︷ ︸ ︸ ︷︷ ︸ ︸ ︷︷ ︸
︸ ︷︷ ︸ ︸ ︷︷ ︸
4th Channel Network Conference: St-Andrews, July 3-5, 2013 49
Hearing data: Joint tests for fixed effects
• Example: Interaction between the linear time effect and age.
• Estimates and standard errors:
χ210 = 90.4, p < 0.0001 χ2
10 = 110.9, p < 0.0001
4th Channel Network Conference: St-Andrews, July 3-5, 2013 50
Hearing data: Association of evolutions
• Association between underlying random effects: D44×44 of interest
• PCA on correlation matrix of random slopes, left side:
4th Channel Network Conference: St-Andrews, July 3-5, 2013 51
Overall conclusions
4th Channel Network Conference: St-Andrews, July 3-5, 2013 52
• Mixed models provide flexible tools for hierarchical data:
. Unbalanced data
. Multiple levels
. Natural way to incorporate association by modeling variability
. Natural extension of ‘standard models’
. Large data sets can be handled (pseudo-likelihood)
• However:
. Parameter interpretation needs careful reflection
. Inference not always standard
. Computational issues, especially in large data sets
. Model assessment more involved
4th Channel Network Conference: St-Andrews, July 3-5, 2013 53
Thanks !4th Channel Network Conference: St-Andrews, July 3-5, 2013 54