Repeated measures: Approaches to Analysis Peter T. Donnan Professor of Epidemiology and Biostatistics
Mar 15, 2016
Repeated measures:
Approaches to Analysis Peter T. Donnan
Professor of Epidemiology and Biostatistics
Objectives of sessionObjectives of session
• Understand what is meant by Understand what is meant by repeated measuresrepeated measures
• Be able to set out data in Be able to set out data in required formatrequired format
• Carry out mixed model analyses Carry out mixed model analyses with continuous outcome in SPSSwith continuous outcome in SPSS
• Interpret the outputInterpret the output
Repeated MeasuresRepeated Measures
Repeated Measures arise when: Repeated Measures arise when: • In trials where baseline and several In trials where baseline and several
measurement of primary outcomemeasurement of primary outcome• Example - Trial of Chronic Example - Trial of Chronic
RhinosinusitisRhinosinusitis• Treatment usual care vs 2 weeks Treatment usual care vs 2 weeks
oral steroidsoral steroids• Measurements at 0, 2 , 10, 28 Measurements at 0, 2 , 10, 28
weeksweeks
General PrinciplesGeneral Principles
Battery of methods to analyse Battery of methods to analyse Repeated Measures: Repeated Measures:
• Repeated use of significance Repeated use of significance testing at multiple time pointstesting at multiple time points
• ANOVA - ANOVA - ‘‘a dangerously wrong method’ - a dangerously wrong method’ - David David FinneyFinney
• MANOVAMANOVA• Multi-level models / mixed modelsMulti-level models / mixed models
Significance testing Significance testing at all time pointsat all time points
• Probably most common – multiple t-testsProbably most common – multiple t-tests• Least valid!Least valid!• Sometimes account for multiple testing Sometimes account for multiple testing
by adjusting p-value i.e. 0.05/k with k by adjusting p-value i.e. 0.05/k with k teststests
• Assumes that aim of study is to show Assumes that aim of study is to show significant difference at significant difference at everyevery time point time point
• Most studies aim to show OVERALL Most studies aim to show OVERALL difference between treatments and /or difference between treatments and /or reaching therapeutic target quickerreaching therapeutic target quicker
• PRIMARY HYPOTHESIS IS GLOBALPRIMARY HYPOTHESIS IS GLOBAL
Repeated Measures: Repeated Measures: Summary MeasuresSummary Measures
• Post treatment meansPost treatment means• Mean change (post – baseline)Mean change (post – baseline)• ANCOVA or Multiple regression ANCOVA or Multiple regression
account for baseline as covariateaccount for baseline as covariate• Slope of changeSlope of change• Maximum value – with multiple Maximum value – with multiple
endpoints select highest value and endpoints select highest value and compare across treatmentscompare across treatments
• Area under the curve – difference Area under the curve – difference • Time to reach a target or peakTime to reach a target or peak
Type of Analyses – Type of Analyses – Compare SlopesCompare Slopes
Compare slopes which summarise Compare slopes which summarise changechange
Acti
vity
Acti
vity
Baseline 3-months
Difference in slopes as summary measuree.g. β1-β2
Advice onlyPedometerControls β1
β2 β3
Type of Analyses – Type of Analyses – Area under the curveArea under the curve
Acti
vity
Acti
vity
Baseline 3-months
Difference in Area between treatment slopes as summary measure
Advice onlyPedometerControls
6-months
Simple approachSimple approach
• Basically just an extension of Basically just an extension of analysis of variance (ANOVA)analysis of variance (ANOVA)
• Pairing or matching of Pairing or matching of measurements on same unit measurements on same unit needs to be taken into accountneeds to be taken into account
• Method is General Linear Model Method is General Linear Model for continuous measures and for continuous measures and adjusts tests for correlationadjusts tests for correlation
Simple approachSimple approach
• But simple approach can only But simple approach can only use COMPLETE CASE analysis use COMPLETE CASE analysis where say wk 0 50, wk 2 47, where say wk 0 50, wk 2 47, wk10 36, wk 28 30wk10 36, wk 28 30
• Then analysis is on 30Then analysis is on 30• Assumes data is MCARAssumes data is MCAR• Better approach is MIXED Better approach is MIXED
MODEL which only assumes MODEL which only assumes MAR and uses all dataMAR and uses all data
Organisation of data Organisation of data (Simple Approach)(Simple Approach)
Generally each unit in one row and repeated measures in separate Generally each unit in one row and repeated measures in separate columns columns
Unit Score 1 Score2 Score3 1 2.8 3.1 4.1 2 5.6 5.7 5.1 3 4.3 4.1 5.4
….
Repeated Measures in SPSS: Set factor and number of levels
Within Within subject factorsubject factor
Within Within subject subject factor levelsfactor levels
Within subject Within subject factor namefactor name
Repeated Measures in SPSS: Enter columns of repeated measures
Use arrow to Use arrow to enter each enter each repeated repeated measure measure columncolumn
Between Between subject factor subject factor columncolumn
Repeated Measures in SPSS:
Select optionsUse arrow to Use arrow to select display select display of means and of means and Bonferroni Bonferroni corrected corrected comparisonscomparisons
Select other Select other optionsoptions
Select a Select a plot of plot of means means of each of each within within subject subject treatmetreatmentnt
Repeated Measures in SPSS: Select options
Repeated Measures in SPSS: Output - Mean glucose uptake
Means for Means for four four treatmenttreatments and s and 95% CI95% CI
1 = Basal; 2 = Insulin; 1 = Basal; 2 = Insulin; 3 = Palmitate; 4 = 3 = Palmitate; 4 = Insulin+Palmitate Insulin+Palmitate
Estimates
Measure: treat
9.617 .911 7.732 11.50213.026 1.155 10.636 15.4157.538 .525 6.453 8.6238.420 .685 7.004 9.837
f actor11234
Mean Std. Error Lower Bound Upper Bound95% Conf idence Interval
Basal Insulin Palmitate Basal Insulin Palmitate Insulin+Palmitate Insulin+Palmitate
Repeated Measures in SPSS: Output – Plot of Mean glucose uptake
Repeated Measures in SPSS: Output – Comparisons of
Mean glucose uptake
ComparisComparison of on of means means with with BonferronBonferroni i correctiocorrectionn
1 = Basal; 2 = Insulin; 1 = Basal; 2 = Insulin; 3 = Palmitate; 4 = 3 = Palmitate; 4 = Insulin+Palmitate Insulin+Palmitate
Pairwise Comparisons
Measure: treat
-3.409* .637 .000 -5.249 -1.5692.079 .723 .051 -.007 4.1641.196 .873 1.000 -1.325 3.7173.409* .637 .000 1.569 5.2495.488* 1.013 .000 2.563 8.4134.605* 1.015 .001 1.677 7.534
-2.079 .723 .051 -4.164 .007-5.488* 1.013 .000 -8.413 -2.563-.882 .741 1.000 -3.022 1.257
-1.196 .873 1.000 -3.717 1.325-4.605* 1.015 .001 -7.534 -1.677
.882 .741 1.000 -1.257 3.022
(J) f actor1234134124123
(I) factor11
2
3
4
MeanDif f erence
(I-J) Std. Error Sig.a Lower Bound Upper Bound
95% Conf idence Interv al forDif f erencea
Based on estimated marginal meansThe mean dif f erence is signif icant at the .05 lev el.*.
Adjustment f or multiple comparisons: Bonf erroni.a.
Repeated Measures:Repeated Measures:ConclusionConclusion
• Energy intake significantly Energy intake significantly higher with insulin compared higher with insulin compared to all other treatmentsto all other treatments
• Addition of palmitate Addition of palmitate removes this effectremoves this effect
Organisation of data Organisation of data (Mixed Model)(Mixed Model)
Note most other programs and Mixed Note most other programs and Mixed Model analyses require ONE row per Model analyses require ONE row per measurement measurement
Unit Score1 2.81 3.11 4.12 5.62 5.72 5.13 4.3
Etc…….
Repeated Measures in Repeated Measures in SPSSSPSS
• Mixed Model in SPSS is: Mixed Model in SPSS is: • Mixed Model Mixed Model
LinearLinear
• Hence can ONLY be used for Hence can ONLY be used for continuous outcomes.continuous outcomes.
• For binary need other For binary need other Software e.g. SASSoftware e.g. SAS
Repeated Measures in SPSS: Mixed: Set within subject factor
Repeated Repeated Within Within subject subject factor factor
Within subject Within subject factor namefactor name
Repeated Measures in SPSS: Enter columns of repeated measures
Use arrow to Use arrow to enter enter subjects and subjects and repeated repeated measure measure columncolumn
Choose Choose covariance covariance type = AR (1)type = AR (1)
Repeated Measures in SPSS:
Select options
Add Add dependentdependentTreatment Treatment factorfactorAnd And covariatescovariates
Select other Select other optionsoptions
Add Add effects effects as fixedas fixedAnd And Main Main EffectsEffects
Repeated Measures in SPSS: Select options
Repeated Measures in SPSS: Output -
Overall Overall test for test for treatmetreatment p = nt p = 0.0240.024
Type III Tests of Fixed Effectsa
1 62.930 27.360 .0001 60.960 5.398 .0241 62.995 .138 .7121 61.041 .020 .888
SourceInterceptTreatmentagesexnum
Numerator dfDenominator
df F Sig.
Dependent Variable: polypgradetotv1.a.
Repeated Measures in SPSS: Output –
Estimates of Fixed Effectsb
2.920968 .631679 62.229 4.624 .000 1.658353 4.183584.740800 .318851 60.960 2.323 .024 .103210 1.378390
0a 0 . . . . ..004508 .012153 62.995 .371 .712 -.019778 .028794.046545 .329233 61.041 .141 .888 -.611788 .704879
ParameterIntercept[Treatment=0][Treatment=1]agesexnum
Estimate Std. Error df t Sig. Lower Bound Upper Bound95% Confidence Interval
This parameter is set to zero because it is redundant.a.
Dependent Variable: polypgradetotv1.b.
Mixed Model Repeated Mixed Model Repeated Measures:ConclusionMeasures:Conclusion• Use of Mixed Models ensures Use of Mixed Models ensures
all data used assuming data all data used assuming data is MAR and so more efficient is MAR and so more efficient in presence of missing data in presence of missing data (if MAR) than the simple (if MAR) than the simple repeated measuresrepeated measures
• Other software e.g. SAS can Other software e.g. SAS can also handle binary outcome also handle binary outcome datadata
Sample size for repeated Sample size for repeated MeasuresMeasures
Number in each arm = Number in each arm =
Where r = number of post treatment Where r = number of post treatment measuresmeasuresp = number of pre-treatment measures p = number of pre-treatment measures often 1often 1Frison&Pocock Stats in Med1992; 11: 1685-1704Frison&Pocock Stats in Med1992; 11: 1685-1704
Sample size for repeated Sample size for repeated MeasuresMeasures
Number in each arm = Number in each arm =
Where Where σσ = between treatment = between treatment variancevarianceδδ = difference in treatment means = difference in treatment meansρρ = pairwise correlation (often 0.5 – = pairwise correlation (often 0.5 – 0.7)0.7)
Sample size for repeated Sample size for repeated MeasuresMeasures
Efficiency increase with number of Efficiency increase with number of measurements (r)measurements (r)(z(zαα +z +zββ))22 = 7.84 for 5% sig and 80% = 7.84 for 5% sig and 80% powerpowerMethods assumes compound Methods assumes compound symmetry – often wrong but symmetry – often wrong but reasonable for sample sizereasonable for sample size
Example: Sample size for Example: Sample size for repeated Measuresrepeated Measures
For r = 3 post-measures, For r = 3 post-measures, correlation=0.7, p=1,correlation=0.7, p=1,(z(zαα +z +zββ))22 = 7.84 for 5% sig. and 80% = 7.84 for 5% sig. and 80% powerpowerSay Say δδ=0.5=0.5σσ then….. then…..
Example: Sample size for Example: Sample size for repeated Measuresrepeated Measures
Which gives n = 19 in each arm Which gives n = 19 in each arm with 80% power and 5% with 80% power and 5% significance levelsignificance level
ReferencesReferencesRepeated Measures in Clinical Trials: Analysis using Repeated Measures in Clinical Trials: Analysis using mean summary statistics and its implications for mean summary statistics and its implications for design. Statist Med 1992; 11: 1685-1704.design. Statist Med 1992; 11: 1685-1704.
Field A. A bluffers guide to …Sphericity. Field A. A bluffers guide to …Sphericity. J Educational Statistics 13(3): 215-226.J Educational Statistics 13(3): 215-226.
Pallant J. SPSS Survival Manual 3Pallant J. SPSS Survival Manual 3rdrd ed, Open University ed, Open University Press, 2007.Press, 2007. Field A. Field A. Discovering Statistics using SPSS for WindowsDiscovering Statistics using SPSS for Windows. . Sage publications, London, 2000.Sage publications, London, 2000. Puri BK. SPSS in practice. An illustrated guide. Arnold, Puri BK. SPSS in practice. An illustrated guide. Arnold, London, 2002.London, 2002.
Thank youThank youforfor
listening!listening!