Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Association of a time varying variable with survival using Landmark analyses

    Dear All,

    I have done a search on statalist, which has unfortunately not turned up anything. I am interested in investigating the association of a change over time of variable A with survival, where variable A was measured at baseline (A0) and 6 (A6) months. Survival time (time [in years]) is censored at 2 years. I have found some examples of scripts performing landmark analyses in Stata, but have been unable to verify whether these user suggested scripts are correct. I would like to have your input on the following script, where I am trying to perform landmark analyses with the landmark at 6 months (t=0.5)

    Do I need to censor cases which experienced an event prior to t=0.5? Or does stsplit handle this for me? Thank you for your time and input!

    Code:
    gen Adif = A6-A0
    
    stset time, failure(event==1) id(ID)
    stsplit landmark, at(0.5)
    
    stcox Adif if landmark==0.5

  • #2
    stsplit is unnecessary. Equivalent code is:
    Code:
     stcox Adif if _t>0.5
    Persons censored or failed prior 0.5 are ignored.

    Added: For a two-year study, recording time in fractions of years is ugly. Can you imagine reporting that median survival was 0.548 years? Also, It's unlikely that the "six month" tests were all done were done the same number of days after the initial test. . As you must certainly have the dates of enrollment, events, and tests, use days as the time unit. Then you can use :
    Code:
     stcox Adif if _t>182
    or even
    Code:
    stcox Adif if _t>180

    Last edited by Steve Samuels; 30 May 2018, 18:40.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Dear Steve,

      Much appreciated, your answer is very helpful. Thank you!

      Best,

      Jasper

      Comment

      Working...
      X