Repeated Measures in SPSS - Dundee University School of Medicine

Download Report

Transcript Repeated Measures in SPSS - Dundee University School of Medicine

Repeated measures:
Approaches to Analysis
Peter T. Donnan
Professor of Epidemiology and Biostatistics
Objectives of session
• Understand what is meant by
repeated measures
• Be able to set out data in required
format
• Carry out mixed model analyses
with continuous outcome in SPSS
• Interpret the output
Repeated Measures
Repeated Measures arise when:
• In trials where baseline and several
measurement of primary outcome
• Example - Trial of Chronic
Rhinosinusitis
• Treatment usual care vs 2 weeks oral
steroids
• Measurements at 0, 2 , 10, 28 weeks
General Principles
Battery of methods to analyse Repeated
Measures:
• Repeated use of significance testing at
multiple time points
• ANOVA ‘a dangerously wrong method’ - David Finney
• MANOVA
• Multi-level models / mixed models
Significance testing at
all time points
• Probably most common – multiple t-tests
• Least valid!
• Sometimes account for multiple testing by
•
•
•
adjusting p-value i.e. 0.05/k with k tests
Assumes that aim of study is to show
significant difference at every time point
Most studies aim to show OVERALL
difference between treatments and /or
reaching therapeutic target quicker
PRIMARY HYPOTHESIS IS GLOBAL
Repeated Measures:
Summary Measures
• Post treatment means
• Mean change (post – baseline)
• ANCOVA or Multiple regression account for
•
•
•
•
baseline as covariate
Slope of change
Maximum value – with multiple endpoints
select highest value and compare across
treatments
Area under the curve – difference
Time to reach a target or peak
Type of Analyses –
Compare Slopes
Activity
Advice only
Pedometer
Controls
β1
β2
Baseline
Difference in
slopes as
summary
measure
e.g. β1-β2
β3
3-months
Compare slopes which summarise change
Type of Analyses –
Area under the curve
Advice only
Pedometer
Controls
Activity
Difference in
Area between
treatment
slopes as
summary
measure
Baseline
3-months
6-months
Simple approach
• Basically just an extension of
analysis of variance (ANOVA)
• Pairing or matching of
measurements on same unit needs
to be taken into account
• Method is General Linear Model
for continuous measures and
adjusts tests for correlation
Simple approach
• But simple approach can only use
COMPLETE CASE analysis where
say wk 0 50, wk 2 47, wk10 36,
wk 28 30
• Then analysis is on 30
• Assumes data is MCAR
• Better approach is MIXED
MODEL which only assumes MAR
and uses all data
Organisation of data
(Simple Approach)
Generally each unit in one row and repeated
measures in separate columns
Unit
1
Score 1
2.8
Score2
3.1
Score3
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 subject
factor
Within subject
factor levels
Within subject
factor name
Repeated Measures in SPSS:
Enter columns of repeated measures
Use arrow to
enter each
repeated
measure column
Between subject
factor column
Repeated Measures in SPSS:
Select options
Use arrow to
select display
of means and
Bonferroni
corrected
comparisons
Select other
options
Repeated Measures in SPSS:
Select options
Select a
plot of
means of
each
within
subject
treatment
Repeated Measures in SPSS:
Output - Mean glucose uptake
Estimates
Means for
four
treatments
and 95%
CI
Measure: treat
f actor1
1
2
3
4
Mean
9.617
13.026
7.538
8.420
Std. Error
.911
1.155
.525
.685
95% Conf idence Interval
Lower Bound Upper Bound
7.732
11.502
10.636
15.415
6.453
8.623
7.004
9.837
1 = Basal; 2 = Insulin;
3 = Palmitate; 4 = Insulin+Palmitate
Repeated Measures in SPSS:
Output – Plot of Mean glucose uptake
Basal
Insulin
Palmitate
Insulin+Palmitate
Repeated Measures in SPSS:
Output – Comparisons of Mean
glucose uptake
Comparison
of means
with
Bonferroni
correction
Pairwise Comparison s
Measure: treat
(I) f actor1
1
2
3
4
(J) f actor1
2
3
4
1
3
4
1
2
4
1
2
3
Mean
Dif f erence
(I-J)
-3.409*
2.079
1.196
3.409*
5.488*
4.605*
-2.079
-5.488*
-.882
-1.196
-4.605*
.882
St d. Error
.637
.723
.873
.637
1.013
1.015
.723
1.013
.741
.873
1.015
.741
a
Sig.
.000
.051
1.000
.000
.000
.001
.051
.000
1.000
1.000
.001
1.000
95% Conf idence Interv al f or
a
Dif f erence
Lower Bound
Upper Bound
-5.249
-1.569
-.007
4.164
-1.325
3.717
1.569
5.249
2.563
8.413
1.677
7.534
-4.164
.007
-8.413
-2.563
-3.022
1.257
-3.717
1.325
-7.534
-1.677
-1.257
3.022
Based on estimated marginal means
*. The mean dif f erence is signif icant at the . 05 lev el.
a. Adjustment f or multiple comparisons: Bonf erroni.
1 = Basal; 2 = Insulin;
3 = Palmitate; 4 = Insulin+Palmitate
Repeated Measures:
Conclusion
• Energy intake significantly higher
with insulin compared to all other
treatments
• Addition of palmitate removes
this effect
Organisation of data
(Mixed Model)
Note most other programs and Mixed Model
analyses require ONE row per measurement
Unit
Score
1
2.8
1
3.1
1
4.1
2
5.6
2
5.7
2
5.1
3
4.3
Etc…….
Repeated Measures in
SPSS
• Mixed Model in SPSS is:
• Mixed Model
Linear
• Hence can ONLY be used for
continuous outcomes.
• For binary need other Software
e.g. SAS
Repeated Measures in SPSS:
Mixed: Set within subject factor
Within subject
factor name
Repeated
Within subject
factor
Repeated Measures in SPSS:
Enter columns of repeated measures
Use arrow to
enter subjects
and repeated
measure column
Choose
covariance type
= AR (1)
Repeated Measures in SPSS:
Select options
Add dependent
Treatment
factor
And covariates
Select other
options
Repeated Measures in SPSS:
Select options
Add
effects
as fixed
And Main
Effects
Repeated Measures in SPSS:
Output -
Overall
test for
treatment
p = 0.024
Type III Tests of Fixed Effectsa
Source
Intercept
Treatment
age
sexnum
Numerator df
1
1
1
1
Denominator
df
62.930
60.960
62.995
61.041
a. Dependent Variable: polypgradetotv1.
F
27.360
5.398
.138
.020
Sig.
.000
.024
.712
.888
Repeated Measures in SPSS:
Output –
Estimates of Fixed Effectsb
Parameter
Intercept
[Treatment=0]
[Treatment=1]
age
sexnum
Estimate
2.920968
.740800
0a
.004508
.046545
Std. Error
.631679
.318851
0
.012153
.329233
df
62.229
60.960
.
62.995
61.041
a. This parameter is set to zero because it is redundant.
b. Dependent Variable: polypgradetotv1.
t
4.624
2.323
.
.371
.141
Sig.
.000
.024
.
.712
.888
95% Confidence Interval
Lower Bound
Upper Bound
1.658353
4.183584
.103210
1.378390
.
.
-.019778
.028794
-.611788
.704879
Mixed Model Repeated
Measures:Conclusion
• Use of Mixed Models ensures all
data used assuming data is MAR
and so more efficient in presence
of missing data (if MAR) than the
simple repeated measures
• Other software e.g. SAS can
also handle binary outcome data
Sample size for repeated
Measures
Number in each arm =
Where r = number of post treatment measures
p = number of pre-treatment measures often 1
Frison&Pocock Stats in Med1992; 11: 1685-1704
Sample size for repeated
Measures
Number in each arm =
Where σ = between treatment variance
δ = difference in treatment means
ρ = pairwise correlation (often 0.5 – 0.7)
Sample size for repeated
Measures
Efficiency increase with number of
measurements (r)
(zα +zβ)2 = 7.84 for 5% sig and 80% power
Methods assumes compound symmetry –
often wrong but reasonable for sample size
Example: Sample size for
repeated Measures
For r = 3 post-measures, correlation=0.7, p=1,
(zα +zβ)2 = 7.84 for 5% sig. and 80% power
Say δ=0.5σ then…..
Example: Sample size for
repeated Measures
Which gives n = 19 in each arm with
80% power and 5% significance level
References
Repeated Measures in Clinical Trials: Analysis using mean
summary statistics and its implications for design. Statist Med
1992; 11: 1685-1704.
Field A. A bluffers guide to …Sphericity.
J Educational Statistics 13(3): 215-226.
Pallant J. SPSS Survival Manual 3rd ed, Open University Press,
2007.
Field A. Discovering Statistics using SPSS for Windows. Sage
publications, London, 2000.
Puri BK. SPSS in practice. An illustrated guide. Arnold, London,
2002.
Contemplating
statistical analysis
Thank you
for
listening!