massimoborelli 21aprile2016borelli/medici/lezione3.pdf · 3 0.20 0.00 f 71 dx ranib 18 4 0.20 0.00...
TRANSCRIPT
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Studi clinici longitudinali: metodi di analisi statistica
Massimo Borelli
21 aprile 2016
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
2005, John Ioannidis
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
2009, Marcia Angell
It is simply no longer possible to believemuch of the clinical research that ispublished, or to rely on the judgment oftrusted physicians or authoritativemedical guidelines. I take no pleasurein this conclusion, which I reachedslowly and reluctantly over my twodecades as an editor of The NewEngland Journal of Medicine.
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
2015, Richard Horton
The case against science isstraightforward: much of the scientificliterature, perhaps half, may simply beuntrue. Afflicted by studies with smallsample sizes, tiny effects, invalidexploratory analyses, and flagrantconflicts of interest, together with anobsession for pursuing fashionabletrends of dubious importance, sciencehas taken a turn towards darkness.
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
2016, Ron Wasserstein
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
what does it mean ’longitudinal’?
time (hour)
PaO
2F
iO2
100
200
300
400
0 2 4 6 8 1012
●
●
●
●
●
●●
●
●●
●●
●
●
●
●
●
●●
●
●
● ●
●
● ●
● ●
●
●●
●
●
● ●●
●
● ●
●
● ●●
●●
●●
●
●●
● ●
●●
●
●●
●
● ●
●● ●
●● ●
●●
●
● ●
●
●
● ●●
●●
●●●
●●
●
●
●
●
●
●
●
●
●
●●
●
●● ●
● ●
●
● ●●● ●
●
●
● ● ● ●
●
●● ●
●
● ● ●
●●
●
●●● ●
●●
●
●●●
●
●●
●
● ●
●
hfpv
0 2 4 6 8 1012
● ●●
●● ● ●
●
●
● ● ●●
●● ●
●●
● ●
● ●
●●
●
●●
●● ●
● ●●
●● ●●
● ●●● ●
● ●● ● ●●
●● ●
●●● ● ●
● ● ● ●●
● ● ●
● ●●
●● ● ● ●●
● ● ●●
● ●●
● ●
● ●● ● ● ●●
● ● ●● ●
● ●
● ●●
●
● ●●
●
●
● ●●
● ●●
●●
●● ●● ● ● ●●
●● ●
● ● ● ●
●
● ●●
● ●● ●
● ● ● ●
control
U. Lucangelo et al., 2011. Early Short-Term Application of High-Frequency Percussive Ventilation.
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
clinical topics
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the vitrectomia dataset
Soggetto Nascita Datavisita Tipovisita Occhio979 164 11760 41908 Apreop OS980 164 11760 41948 B30 OS981 164 11760 42008 C90 OS982 164 11760 42098 D180 OS983 164 11760 42283 E365 OS984 164 11760 42352 Finale OS
PTrattato PControllo Sesso Intervento Gauge979 12 12 M Mer 27980 8 12 M Mer 27981 12 12 M Mer 27982 15 12 M Mer 27983 13 12 M Mer 27984 11 13 M Mer 27
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the maculopatia dataset
Subject AcVis Time Gender Age Eye Drug Injection1 0.63 0.00 F 68 sx Beva 152 0.40 0.00 F 82 dx poli 143 0.20 0.00 F 71 dx Ranib 184 0.20 0.00 M 64 dx poli 255 0.25 0.00 F 83 dx poli 76 0.63 0.00 M 79 dx poli 8.. .. .. .. .. .. .. 4
280 NA 72.00 F 80 sx Ranib 3281 NA 72.00 F 85 sx Beva 3282 NA 72.00 F 88 sx poli 9
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
time profiles
Tempo post-operatorio (giorni)
Diff
eren
za d
i Pre
ssio
ne
-5
0
5
0 500 1000 1500 2000 2500
Follow-up (mesi)
Acu
ità V
isiv
a
0.0
0.2
0.4
0.6
0.8
1.0
0 6 12 18 24 30 36 42 48 54 60 66 72
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Table of contents
1 the wrong analysis
2 the difficult question
3 the mixed-effects models
4 insight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
a wrong analysis
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
a wrong analysis
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
a wrong conclusion
wrong!
The second order polynomialregression exhibit a strongerR2 determination coefficient(0.30 vs. 0.02 in the linearcase), therefore we deducethat the terapy has aneffect in slowing downthe disease
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Why that analysis is wrong?
we have to face different difficultiesto ’reduce repeated information’ into one numberassure reliable inference
managing the twins effect :-)managing the latent variables / hierarchical structure
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the twins effect :-)
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
@p − value p − value = 0.54 p − value = 0.02Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
explanation of the phenomenon
t =m1 −m2√
s21n1 +
s22n2
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the most dangerous equation
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the most dangerous equation
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
a wrong conclusion
so, what was wrong?to have considered eachpoint as an ’independent’observation, forgettingthat there is informationcarried in (i.e. previouspatient conditions)
The second order polynomialregression exhibit a strongerR2 determination coefficient(0.30 vs. 0.02 in the linearcase), therefore we deducethat the terapy has aneffect in slowing downthe disease
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
a wrong conclusion
so, what was wrong?to have considered eachpoint as an ’independent’observation, forgettingthat there is informationcarried in (i.e. previouspatient conditions)
0 2 4 6
02
46
810
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the mixed-effects models
good newsa mixed-effects model allows to
obtain (population) time-evolution estimates from the(random sample) observations
fixed effectsto take in account the patient-level time-evolution within the(random) sample observed
random effects
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
what are we going to talk now?
1 the idea behind a mixed-effects model2 to explain the difference between fixed and random effects3 hard – to pursuit a proper model selection
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
the idea behind
0 2 4 6
02
46
810
0 2 4 60
24
68
10
y = mx + q + ε y = (m + β)x + (q + α) + εMassimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
fixed effects vs. random effects
y = mx + q + ε y = (m + β)x + (q + α) + ε
m, q are (population) fixed effectsα, β are (patient) random effectsε is the residual random effects
α, β, ε ∼ N(0, ...)
cor(α, β) = ...
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
hard - model selection / fixed effects
0 2 4 6
02
46
810
parabola
0 2 4 6
02
46
810
LINE
0 2 4 6
02
46
810
costant
0 2 4 6
-50
5
PARABOLA
0 2 4 6
-50
5
line
0 2 4 6-5
05
constant
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
hard - model selection / random effects
0 2 4 6
02
46
810
0 2 4 6
02
46
810
0 2 4 6
02
46
810
(m + β)x + (q + α) (m + β)x + (q + α) mx + (q + α)cor(α, β) = ρ cor(α, β) = 0
ε ε ε
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
hard - model selection
Three way are commonly exploited to pursuit a model selection- deviance analysis (under Maximum Likelihood estimates)- information criteria (e.g. AIC)+ parametric bootstrap
Note: first two methods properly work only on fixed effectsJ. Faraway, 2016, ISBN 9781498720960.
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
hard - parametric bootstrap
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
hard - model selection
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
with R: model summary
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
with R: to understand summary
y = mx + (q + α) + ε
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
insight: the bayesian approach
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
please, note the differences (1/3)
wrong1 = lm(AcVis ∼ 1 + Time)summary(wrong1)
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
please, note the differences (2/3)
mixed1 = lmer(AcVis ∼ 1 + Time + (1|Subject))summary(mixed1)
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
please, note the differences (3/3)
formula = AcVis ∼ 1 + Time + f(Subject, model = iid)output = inla(formula, family = gaussian)summary(output)
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
great advantage
-0.7 -0.6 -0.5 -0.4 -0.3
0510
posterior marginal
β1
p~ (β 1|y)
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
some textbooks
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica
the wrong analysisthe difficult question
the mixed-effects modelsinsight: the bayesian approach
ringraziamenti
Arjuna, Federico, Roberto: youtube.com/medicinatrieste
Massimo [email protected]
www.dmi.units.it/borelli/
Massimo Borelli Studi clinici longitudinali: metodi di analisi statistica