university of copenhagen department of biostatistics Faculty of Health Sciences Correlated data Further topics Lene Theil Skovgaard December 11, 2012 1 / 96 university of copenhagen department of biostatistics Further topics Specification of mixed models Model check and diagnostics Explained variation, R 2 Missing values Several series for each individual Additional examples: Visual acuity example (from Variance components II) Baseline revisited: Simple before and after study Reading ability 2 / 96 university of copenhagen department of biostatistics Specification of mixed models Systematic variation: Between-individual covariates: treatment, sex, age, baseline value... Within-individual covariates: time, cumulative dose, temperature... is specified “as usual”, including possible interactions Random variation Interactions between systematic and random effects are always random 3 / 96 university of copenhagen department of biostatistics Sources of random variation 1. Random effects: 2. Serial correlation: 3. Measurement error: 4 / 96
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Faculty of Health Sciences
Correlated dataFurther topics
Lene Theil SkovgaardDecember 11, 2012
1 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Further topics
I Specification of mixed modelsI Model check and diagnosticsI Explained variation, R2
I Missing valuesI Several series for each individualI Additional examples:
I Visual acuity example (from Variance components II)I Baseline revisited: Simple before and after studyI Reading ability
2 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Specification of mixed models
I Systematic variation:I Between-individual covariates:
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Model check and diagnostics (normal models)
I Ordinary residuals, from systematic effect, Yi − Xi βThese will be correlated
I Conditional residuals, Yi − Xi β + Zi biI Normality of random effects, estimated BLUP’s, biI Investigation of covariance structure, (variogram)I Detection of influential observations
16 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Normality of random effects
Model checksI Histogram of BLUP’s from the model is not worth muchI Instead, build model with a mixture of normal distributions
and make a test....
If normality does not apply:I no large effect on estimates for β, G and RI standard error become biased,
but may be corrected in various waysI BLUP’s bi become invalid, especially when the residual
variance σ2 is large
17 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Variogram
Variance of difference between time points:
γ(u) = 12E(εt − εt−u)2 = τ2(1 − ρ(u)) + σ2
I Nugget: σ2
I Sill: τ2 + σ2
I Variance: ω2 + τ2 + σ2
18 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Local influence
Idea:I Put some infinitesimal extra weight (∆) on a single
observation (i); Weight vector:
ω∆i = (1, · · · , 1 + ∆, · · · , 1)I Look at the change in likelihood:
LD(ω∆i) = 2(l(θ) − l(θω∆i ))
I Make a Local influence plot (i,Ci), where
Ci = 1∆LD(ω∆i)
19 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Reasons for a large influence
I unusual combination of covariates Xi
I large ordinary residuals (from Xiβ)
I unusual combination of covariates Zi
I bad choice of covariance pattern Vi(α)
20 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Explained variation in percent, R2
We have two (or more) different variances to explain!I Residual variation (variation within individuals, σ2
W )I decreases (as usual)
when we include an important x covariate (level 1)I may decrease
when we include an important z covariate(level 2)
I Variation between individuals , ω2B
I decreaseswhen we include an important z covariate (level 2)
I may increase or decrease,when we include an important x covariate (level 1)
21 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Hypothetical example
The x’s vary between individuals, and the average outcomes (y)are mostly due to this variation:
Levels of y, for fixed x are quite alike!ω2 decreases
22 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Another hypothetical example
The x’s vary between individuals, but the average outcomes (y)are almost identical:
Levels of y, for fixed x are very different!ω2 increases
23 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Missing values
Most investigations are planned to be balancedbut almost inevitable turn out to have missing values,or drop-out patients
I just by coincidence (blood sample lost or ruined)I because of exclusion (the patient has recovered)I we lost track of the patient (may be worrysome)I the patient is too ill to show up
(very serious, i.e. carrying information)
24 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Types of missing data
I Single missing valuesI Drop-outs
25 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Possible missing mechanism, I
Low values are good:When the patient is well treated, he drops out
26 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Possible missing mechanism, II
Low values are bad:Below some threshold, the patient is too ill to show up(informative missing)
27 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Notation
I Outcome YgitI Parameters θ (level, slope etc.)I Covariates xgitI Indicator of missing cgitI Missing outcomes Y ∗git not observed, i.e. corresponding to
cgit = 1
28 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Types of missingness
MCAR Missing completely at randomP(cgit = 1) depends only on the parameter θ
MAR Missing at randomI CDEP: P(cgit = 1) depends upon θ and
covariates xgitI YDEP: P(cgit = 1) depends upon θ, covariates
xgit and observed outcomes Ygit
NI Non-ignorable: (informative missing)P(cgit = 1) depends upon the unobserved=missingoutcome Y ∗git
29 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Hypothetical TLC-observations
Lung capacity measured at regular time intervalsfor two groups, that we want to compare
30 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Average for the two groups
31 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Hypothetical example: Informative missing
Patients who get below 3.5 drop out, averages change
32 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Traditional handling of missing data
I Complete case analysisI LOCF: Last observation carried forwardI Time average imputationI Model prediction imputation
I Likelihood methods
33 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Complete case analysis
Make an analysis including only those individuals who are observedat all available time points
I Information lossI Potential bias, if there is a specific reason for the missingness
34 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
LOCF: Last observation carried forwardIf an individual has no observed value at time tk , replace themissing value by the previous observation, tk−1For drop-outs, all subsequent values will equal this tk−1
I The time effect will be less pronouncedI Large residuals, i.e. overestimation of residual variation
35 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Time average imputation
I Subject effect will be underestimatedI Large residuals, i.e. overestimation of residual variation
36 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Model prediction imputation
I Two-step procedureI Too small residuals, i.e. downwards bias of of SD
37 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Likelihood methods
Mixed models for all available observations
38 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
MCAR: Missing completely at random
I Complete case analysis OK, but inefficientI If only few observations are missing, imputations could work
but the variations will be affectedI Likelihood approaches (mixed models) OK
uses all available information
39 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
MAR: Missing at random
I Complete case analysis is biasedWe disregard subjects with special characteristics
I If only few observations are missing, imputations could workbut the variations will be affected
I Likelihood approaches (mixed models) OKuses all available information
40 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Mixed models for MAR
41 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Non-ignorable
Nothing works!
Many attempts have been tried to model the missing mechanisms,but they all rely on assumptions that cannot be checked.
42 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Example: Effect of exercise on appetite
53 subjects, in three groups:I ControlI Moderate exercise: 1
2 hour a dayI Extensive exercise: 1 hour a day
Before and after exercise/placebo:Exercise test, with blood samples taken every half hour frombaseline until 3 hours.Several hormones are measured, e.g. ghrelin
Mads Rosenkilde
43 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
HIGH, week=Pre
44 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
HIGH, week=Post
45 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Baseline differences, before exercise?
No, not reallyCan we then disregard these?
46 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
47 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
48 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Aim of investigation
Does the exercise change something?I Does the time course change from the first to the second
week (pre/post exercise)?I If so, does it change more than for the control group?I And does it apply equally to the two exercise groups?
49 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Model for each group separately
Fixed effectsI week: Pre or PostI time: 0, 30, 60, 90, 120, 150, 180 minutesI Interaction week*time:
A change in the pattern from before to after exerciseRandom effects
I Patients, Sub: 18 (HIGH, MOD), 17 (XCON)I Interaction Sub*week
Serial covariance structureI Autoregressive?I Local error term?
50 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Analysis for each group separately
proc mixed data=a0 covtest; by grp;class Sub week time;model log_ghrelin=time week*time
/ ddfm=satterth s cl;random intercept / subject=Sub vcorr v;repeated time / subject=Sub*week
type=sp(pow)(numtime) local rcorr r;lsmeans week*time / slice=time;
run;
51 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Output, exercise HIGH
grp=HIGH
The Mixed Procedure
Model Information
Data Set WORK.A0Dependent Variable log_ghrelinCovariance Structures Variance Components,
Spatial PowerSubject Effects Sub, Sub*weekEstimation Method REMLResidual Variance Method ProfileFixed Effects SE Method Model-BasedDegrees of Freedom Method Satterthwaite
Class Level Information
Class Levels ValuesSub 18 ALMA ANAP ANLO ANTF BRFR CASC
CHBE DAHA DERJ GRPE HEJE JAKUMIFH MIMR MIMÂİ MINI NIHA THES
week 2 Post Pretime 7 0 30 60 90 120 150 180
52 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Output, exercise HIGH, II
DimensionsCovariance Parameters 4Columns in X 24Columns in Z Per Subject 1Subjects 18Max Obs Per Subject 14
Covariance Parameter Estimates
Standard ZCov Parm Subject Estimate Error Value Pr ZIntercept Sub 0.008593 0.003105 2.77 0.0028Variance Sub*week 0.001219 0.000374 3.26 0.0005SP(POW) Sub*week 0.6549 0.1744 3.75 0.0002Residual 0.000817 0.000214 3.81 <.0001
53 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Output, exercise HIGH, III
Type 3 Tests of Fixed Effects
Num DenEffect DF DF F Value Pr > Ftime 6 105 6.77 <.0001week*time 7 53.8 1.89 0.0885
Type 3 Tests of Fixed Effects
Num DenEffect DF DF F Value Pr > Fweek 1 16.8 0.24 0.6302time 6 105 6.77 <.0001week*time 6 105 2.13 0.0560
54 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Num DenEffect DF DF F Value Pr > Fpatient 6 6 3.40 0.0810eye 1 6 0.78 0.4112power 3 18 2.25 0.1177eye*power 3 18 1.06 0.3925
Can you think why?85 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Example with only two time points (baseline and follow-up)from Vickers, A.J. & Altman, D.G.: Analysing controlled clinicaltrials with baseline and follow-up measurements.British Medical Journal 2001; 323: 1123-24.:
52 patients with shoulder pain are randomized to eitherI Acupuncture (n=25)I Placebo (n=27)
Pain is evaluated on a 100 point scalebefore and after treatment.High scores are good
86 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Results on pain scores
Comparison of the two groupsAverage pain score Treatment effectplacebo acupuncture difference(n=27) (n=25) (95% CI) P-value
Baseline 53.9 (14.0) 60.4 (12.3) 6.5 0.09
Type of analysisFollow-up 62.3 (17.9) 79.6 (17.1) 17.3 (7.5; 27.1) 0.0008
* results published in Kleinhenz et.al. Pain 1999; 83:235-41.
87 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Development of pain, actual and hypothetical
88 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Approaches for pain score analysis
BaselineI The acupuncture group lies somewhat above placebo
Follow-upI We would expect the acupuncture group to be higher also
after treatmentI Therefore, a direct comparison of follow-up times is
unreasonable(we see too big a difference)
89 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Approaches for pain score analysis, II
ChangeI Low baseline implies an expected large positive change
(regression to the mean)I The placebo group is therefore expected to increase the mostI Therefore, a direct comparison of changes is unreasonable
(we see too small a difference)
90 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
General approaches for handling baseline
I AncovaAnalysis of covariance, a special case of multiple regression:
I Outcome: follow-up dataI Covariates
I treatment (factor: acupuncture/placebo)I baseline measurement (quantitative)
I Repeated measurement analysisI Treatment effect appears as an interaction between treatment
and time
91 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Recommandation
When can we use follow-up data?I when we have a control group and proper randomisationI when the correlation is low
When can we use differences?I when we have a control group and proper randomisationI when the correlation is large
When can we use analysis of covariance?I always -
as long as baseline imbalance is not related to treatmenteffect!
92 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Example: Reading abilityas a function of age/training and cohort/age:Longitudinal (within-individual, βW ) effect vs.cross-sectional (between-individual, βB) effect:
93 / 96
u n i v e r s i t y o f c o p e n h a g e n d e p a r t m e n t o f b i o s t a t i s t i c s
Model
I Baseline level: ap1 at the age xp1:ap1 = α+ βBxp1 + δp, βB negative