Announcement

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

  • Survival analysis in STATA: what's the correct approach to model treatment effect and time-varying binary comorbidities?

    Dear all,

    I have a dataset in STATA. I want to estimate the effect of the treatment (treat), a time-invariant variable, using survival analysis (let's say, starting with a Cox model). My outcome is the drug abandonment.

    Patients are interviewed at each outpatient visit (the first is always at three months, then generally at six months, 12 months, etc.).
    I have binary covariates (comorbidity1, comorbidity2, comorbidity3) that may be present or not at different moments during the patient's observation period.

    The dataset has the following structure (I'm showing only two or three patients). Time, as I said before, represents the observation time in months.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte(id time abandonment treatment comorbidity1 comorbidity2 comorbidity3)
    1  3 0 1 1 0 1
    1  6 0 1 1 1 1
    1 12 0 1 0 1 0
    1 14 1 1 1 0 0
    2  3 0 0 1 1 0
    2  6 0 0 0 1 1
    2  7 1 0 0 1 0
    3  3 0 0 0 1 0
    3  6 0 0 0 1 0
    3 12 0 0 1 1 0
    3 18 0 0 0 0 1
    3 21 0 0 0 1 1
    end

    How would you analyze it?

    Specifically, to adjust for the effect of time-dependent covariates, is it reasonable to simply include them as covariates in the model without using stsplit? I have seen similar topics, but paradoxically, none of them answer my question.
    Code:
    stset time, id(id) failure(abandonment==1)
    stcox treat comorbidity1 comorbidity2 comorbidity3
Working...
X