modeling change

34
1 Modeling change Kristin Sainani Ph.D. http://www.stanford.edu/~k cobb Stanford University Department of Health Research and Policy

Upload: rgarcia340

Post on 12-Sep-2015

215 views

Category:

Documents


0 download

DESCRIPTION

Modeling Network Change

TRANSCRIPT

  • *Modeling changeKristin Sainani Ph.D. http://www.stanford.edu/~kcobb Stanford University Department of Health Research and Policy

  • *Within vs. Between subject effects

    Solution for Fixed Effects

    Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept 38.1287 4.1727 5 9.14 0.0003 time -0.08163 0.3234 16 -0.25 0.8039 chem -0.01283 0.003125 16 -4.11 0.0008

    Example 1: last weeks example.CHEM: -.01283A significant chemical effect (time-dependent predictor) could either represent a between-subjects effect or a within-subjects effect.Because these data were made-up, we happened to know that there was primarily a within-subjects effect

  • *Example 1..from last time6 patients with depression are given a drug that increases levels of a happy chemical in the brain. At baseline, all 6 patients have similar levels of this happy chemical and scores >=14 on a depression scale. Researchers measure depression score and brain-chemical levels at three subsequent time points: at 2 months, 3 months, and 6 months post-baseline.Here are the data in broad form:

  • *Example 2Same as example 1, but made up to have more between-subjects effect than within-subjects effect.

  • *Example 3Same as example 1, but made up to have ONLY between-subjects effect

  • Example 2 (more between-subjects effects): showing two subjectsid=1: scoreid=2: chemid=1: chemid=2: score

  • Example 2:

  • Example 2:

  • Example 2:

  • Example 2:

  • Example 2:

  • Example 2:

  • Example 3:all between-subjects effects

  • Example 3:

  • Example 3:

  • Example 3:

  • Example 3:

  • Example 3:

  • *Results, example 1

    Solution for Fixed Effects

    Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept 38.1287 4.1727 5 9.14 0.0003 chem -0.01283 0.003125 16 -4.11 0.0008 time -0.08163 0.3234 16 -0.25 0.8039

    Example 1: significant chem effect.CHEM: -.01283proc mixed data=hrp262.long2;model score=chem time / solution;random int/subject=id;run;

  • *Results, example 2

    Solution for Fixed Effects

    Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept 52.0159 4.2057 5 12.37

  • *Results, example 3

    The Mixed Procedure

    Solution for Fixed Effects

    Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept 60.8810 2.4237 5 25.12

  • *All three examples give the same resultTheres no way to tell if change in chemical levels is causing change in depression score (which is what we probably care about).What to do?...

  • *OptionsExamine graphs!Evaluate baseline relationship of chemical1 and score1 using regular linear regression Here, you will find a strong relationship only in examples 2 and 3, suggesting strong between-subjects effects.Drawback: you still cant rule out within-subjects effects (could have both)Use only baseline value of chemical (chem1) as a predictor in GEE or Mixed and add a time*chem1 interaction to the model to evaluate change. Here, you will find that chem1 main effect is significant but chem1*time is not in examples 2 and 3Drawback: A significant time*chem1 interaction would indicate that baseline chemical levels predict change in depression score over time, which is slightly different than saying that change in chemical level predicts change in depression score.Correlate change in time-dependent predictor with change in repeated-measures outcomeCalculate overall change or percent change in outcome and regress this on overall change or percent change in the predictor: see chapter 8 of Twisk (2 time points only)OR model all the changes together (vector of changes)

  • *The change model

  • *SAS code to change datadata hrp262.change;set hrp262.broad;time=0; ctime=2; cscore=time2-time1; cchem=chem2-chem1; output;time=1; ctime=1; cscore=time3-time2; cchem=chem3-chem2; output;time=2; ctime=3; cscore=time4-time3; cchem=chem4-chem3; output;label cchem='change in chemical';label cscore='change in depression score';run;

  • id cscore cchem time

    1 -3 10 1 1 -3 -10 2 1 5 15 3 2 -4 10 1 2 3 -30 2 2 -1 -10 3 3 0 -20 1 3 -1 10 2 3 -3 5 3 4 1 5 1 4 -1 -1 2 4 1 -19 3 5 1 0 1 5 -1 5 2 5 2 80 3 6 1 -150 1 6 1 80 2 6 -3 60 3So, look at change in depression score as your outcome variable. All time-dependent predictors also get a change score.

  • *Example 1: nave linear regression cscore = -0.126817 - 0.011357*cchem

  • *Example 2: nave linear regression cscore = -0.167511 - 0.012043*cchem

  • *Example 3: nave linear regression cscore = -0.268792 - 0.004044*cchem

  • *Modeling changes (mixed)EXAMPLE 1: Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept 0.3407 1.6018 5 0.21 0.8400 time -0.4669 1.2298 10 -0.38 0.7122 cchem -0.01136 0.002336 10 -4.86 0.0007

    EXAMPLE 2: Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept -0.04810 1.6106 5 -0.03 0.9773 time -0.1151 1.2225 10 -0.09 0.9269 cchem -0.01218 0.006324 10 -1.93 0.0830 EXAMPLE 3: Solution for Fixed Effects Standard Effect Estimate Error DF t Value Pr > |t|

    Intercept -0.8621 0.9697 5 -0.89 0.4147 time 0.6023 0.7825 10 0.77 0.4592 cchem -0.00807 0.01334 10 -0.60 0.5587

  • *Modeling changes (GEE)EXAMPLE 1: Analysis Of GEE Parameter EstimatesStandard 95% Confidence Parameter Estimate Error Limits Z Pr > |Z|

    Intercept 0.3407 1.2757 -2.1596 2.8409 0.27 0.7894 time -0.4669 1.2698 -2.9557 2.0219 -0.37 0.7131 cchem -0.0114 0.0011 -0.0136 -0.0091 -9.93 |Z|

    Intercept -0.0481 1.6245 -3.2320 3.1358 -0.03 0.9764 time -0.1151 1.2030 -2.4728 2.2427 -0.10 0.9238 cchem -0.0122 0.0050 -0.0219 -0.0024 -2.45 0.0143 EXAMPLE 3:Analysis Of GEE Parameter Estimates Standard 95% Confidence Parameter Estimate Error Limits Z Pr > |Z|

    Intercept -0.7146 1.5997 -3.8498 2.4207 -0.45 0.6551 cchem 0.0060 0.0112 -0.0160 0.0280 0.53 0.5955 time 0.2118 0.8366 -1.4280 1.8516 0.25 0.8000

  • *The change modele.g., just regular old linear regression, where each person contributes three independent observations

  • *The change modelIf time intervals are unequal and unbalanced, you might choose to include the change in time as a predictor in the model. Otherwise, you could face confounding by the time between measurements (which might be correlated with the time-dependent predictor)

  • *ReferencesJos W. R. Twisk. Applied Longitudinal Data Analysis for Epidemiology: A Practical Guide. Cambridge University Press, 2003.

    *Kristin Sainani Ph.D. http://www.stanford.edu/~kcobb Stanford University Department of Health Research and Policy********************************