performing repeated measures analysis · 2017. 12. 13. · what are “repeated measures” data a...

29
Performing repeated measures analysis Graeme L. Hickey @ graemeleehickey www.glhickey.com [email protected]

Upload: others

Post on 20-Feb-2021

0 views

Category:

Documents


0 download

TRANSCRIPT

  • PerformingrepeatedmeasuresanalysisGraemeL.Hickey

    @graemeleehickey www.glhickey.com [email protected]

  • Conflictsofinterest

    • None• AssistantEditor(StatisticalConsultant)forEJCTSandICVTS

  • Whatare“repeatedmeasures”data

    A

    BD A

    BD A

    BD

    “Condition”:chocolatecake “Condition”:lemoncake “Condition”:cheesecake

    Measurement:tastescore Measurement:tastescore Measurement:tastescore

    Samepeoplescoreeachcondition

  • Whatare“repeatedmeasures”data

    A

    BD A

    BD A

    BD

    Measurement:systolicBP Measurement:systolicBP Measurement: systolicBP

    SamepeopleprovideBPateveryfollow-upappointment

  • Whydoweneedspecialmethodology?

    • Dataarenotindependent:repeatedobservationsonthesameindividualwillbemoresimilartoeachotherthantoobservationsonotherindividuals

    • Guidelines forreportingmortalityandmorbidityaftercardiacvalveinterventionsalsoproposetheuseoflongitudinaldataanalysisforrepeatedmeasurementdata

  • Simplestcase:2measurementtimes

    A

    BD A

    BD

    Measurement:AVgradient Measurement:AVgradient

    pre-surgery post-surgery

    Suitablemethods: pairedt-testorWilcoxonsigned-ranktest

  • Whatifwehavetreatmentgroups?

    AB

    D

    Measurementtaken Measurementtaken

    beforetreatment aftertreatment

    AB

    D

    EF

    H EF

    H

    Placeb

    oActive

    treatm

    ent

    Question:ifpatientsarerandomisedtotreatmentarms,howcanwetestwhetheractivetreatment ismoreeffectivethanplacebo?

  • Methods: shoulderpainexample

    Source:Vickers&Altman.BMJ.2001;323:1123–4.

    Placebo(n =27)

    Acupuncture(n =25)

    Differencebetweenmeans

    (95%CI)

    P

    Follow-up 62.3(17.9) 79.6(17.1) 17.3(7.5to27.1)

  • Moregeneralscenario

    • Werecordmeasurementsofeachpatient>2times• Two(ormoretreatmentgroups)

  • Designconsiderations

    • Balancedversus unbalanced• Balanced follow-up(e.g.baseline,1-hr,2-hr,8-hr,16-hr,24-hr)• Unbalanced (e.g.patientAvisitstheirphysicianondays1,4,6,9,12,andpatientBvisitsonlyondays5,9,and15)

    • Missingdata• E.g.patientfailstoattendscheduled follow-upappointment

  • Hownot toproceed

    • Multipletestingissues• Noaccountofsamepatientsbeingmeasured⇒successiveobservationslikelycorrelated• Visualization+reportingissues

    Source:Matthewsetal.BMJ.1990;300:230–5.

  • Dataformat/collection

    WideformatSubject Jan01 Aug30 Dec08

    A 120 113 115

    B 94 94 110

    C 140 145 160

    D 100 101 100

    LongformatSubject Date BP(mmHg)

    A Jan01 120

    A Aug30 113

    A Dec08 115

    B Jan01 94

    B Aug30 94

    B Dec08 110⠇ ⠇ ⠇

    D Aug30 101

    D Dec08 100

    Goodforbalanceddatasets

    Goodforunbalanceddatasets

  • Firststep(always!):visualizethedata

    Source:Gueorguieva &Krystal.ArchGenPsychiatry.2004;61:310–317.

    Meanprofileplot

    Source:Matthewsetal.BMJ.1990;300:230–5.

    IndividualpanelplotsIndividualplotsgrouped

    bytreatment

  • Analysisoptions

    • Repeatedmeasuresanalysisofvariance(RM-ANOVA)• Linearmixedmodels(LMMs)• Summarystatistics/data-reductiontechniques• Multivariateanalysisofvariance(MANOVA)• Generalizedleastsquares(GLS)• Generalizedestimatingequations• Non-linearmixedeffectsmodels• EmpiricalBayesmethods• …

  • RM-ANOVATotal

    variation

    Between-subjectsvariation

    Within-subjectsvariation

    Treatment

    Errorduetosubjectswithin

    treatment

    Time Treatment*Time Error

    Testfor: treatmenteffecttimeeffectinteractioneffect

  • Sphericity

    • RM-ANOVAdependsontheusualassumptionsforANOVA…• … andtheassumptionofsphericity

    SDT2– T1 ≅ SDT3– T1 ≅ SDT3– T2 ≅ …

    • Restrictiveforlongitudinaldata⇒measurementstakencloselytogetherareoftenmorecorrelatedthanthosetakenatlargertimeintervals

    • TestforsphericityusingMauchly’stest

    Tomorrow(14:15– 15:45):Checkingmodelassumptionswithregressiondiagnostics

  • Whensphericityisviolated

    • Ifsphericityisviolated,thentypeIerrorsareinflatedandinteractiontermeffectsbiased– thatisserious• Mauchly’stestmaynotrejectsphericityifthesamplesizeissmall,evenifthevariancesarevastlydifferent

    Correctionproposal:1. Calculatetheepsilonstatistic

    i. Greenhouse-Geisserii. Huynh-Feldt

    2. MultiplytheF-statisticdegreesoffreedombyepsilon

  • Linearmixedmodels

    • Generalizeslinearregressiontoaccountforcorrelationinrepeatedmeasureswithinsubjects• Alsodescribedasrandomeffectsmodels,mixedeffectsmodels,randomgrowthmodels,multi-levelmodels,hierarchicalmodels,…

  • Outcome

    Time

  • 𝑦"# = 𝛽& + 𝛽(𝑡"# + 𝜀"#

    Fixed effects regression line

    Time

    Outcome

  • 𝑦"# = 𝛽&" + 𝛽(𝑡"# + 𝜀"#

    Fixed effects regression line + within-subject intercepts

    Time

    Outcome

  • Within-subjects fixed effects regression lines

    𝑦"# = 𝛽&" + 𝛽("𝑡"# + 𝜀"#

    Time

    Outcome

  • Linearmixedmodels

    • Acompromiseisthemodel

    𝑌"# = 𝛽& + 𝑏&" + 𝛽( + 𝑏(" 𝑡"# + 𝜀"#

    • 𝑏&", 𝑏(" arecalledsubject-specificrandomintercepts:interceptandsloperespectively,distributedN2(0,Σ)

    • Observationswithin-subjectsaremorecorrelatedthanobservationsbetween-subjects• Canbeadjustedforother(possiblytime-varying)covariatesandbaselinemeasurements

  • Summarystatistics

    • Atwo-stageapproach:1. Reducetherepeatedmeasurementsforeachsubjecttoasinglevalue2. Applyroutinestatisticalmethodsonthesesummaryvaluestocompare

    treatments,e.g.usingindependentsamplest-test,ANOVA,Mann-WhitneyU-test,…

    • Benefits• Easytodo,andconceptuallyeasytounderstand• Canbeusedtocontrastdifferentfeaturesofthedata• Encouragesresearcherstothinkaboutthefeaturesofthedatamostimportanttotheminadvance

    • Choiceofsummarystatisticdependsonthedata

  • T0 T1 T3 T4

    Outcome

    ymax

    T2

    T0 T1 T3 T4

    Outcome

    T2T0 T1 T3 T4

    Outcome

    ypreT2

    ypost - ypre

    T0 T1 T3 T4T2

    Outcome

    Ifthedatadisplaya‘peakedcurve’trend…

    Areaunderthecurve Maximummeasurement

    TimetoreachmaximumMeanfollow-up– baseline

  • Ifthedatadisplaya‘growthcurve’trend…

    Changescore Finalvalue

    Timetoacertain%increase/decreaseSlope

    T0 T1 T3 T4

    Outcome

    T2

    ychange

    T0 T1 T3 T4

    Outcome

    T2

    yfinal

    T0 T1 T3 T4

    Outcome

    T2

    slope

    T0 T1 T3 T4T2

    Outcome

  • Missingdata

    Method Canithandlemissingdata? Canithandleunbalanceddata?

    RM-ANOVA

    No– typically excludepatientswith1ormissingvalue

    No

    LMM Yes– fordatathatismissing(completely)atrandom Yes

    Summarystatistics

    Dependsonthechoiceofsummary statistic

    Dependsonthechoiceofsummary statistic

  • Software

    • Allmethodsimplementedinstandardstatisticalsoftware

    • Summarystatisticsusuallyrequire‘manual’calculation,butcanbedoneeasilyinMicrosoftExcelorprogrammedinastatisticssoftwarepackage

  • Thankyouforlistening…anyquestions?

    Slidesavailable(shortly)from:www.glhickey.com

    StatisticalPrimerarticletobepublishedsoon!