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

  • #2
    I don't see a need for using stplit as the data appear to already have multiple entries per subject according to the time-varying variables. A more fundamental question seems to be whether (a) your treatment is based on randomized treatment assignment and (b) whether your treatment affects the comorbidities. Regarding (a), if your treatment is not the result of randomized assignment, then very likely you are omitting a number of confounders. Regarding (b), if treatment has an effect on comorbidities (and comorbidities affect the outcome, as hypothesized), then these time-varying variables become mediators and, thus, the effect of treatment would at best reflect something like a 'direct effect' rather than the effect of interest which presumably would be the 'total effect' of treatment. So if (b) is true, you may need more heavy duty machinery; have a look at the gformula article/package for a discussion of this problem.

    Comment


    • #3
      Thank you very much Joerg Luedicke (StataCorp) .

      The issue is actually a bit more complex than I have described.

      The study is not randomized, but I have developed an inverse probability weighting model to remove selection bias. Therefore, I believe issue (a) can be addressed in this way.

      Regarding issue (b), the situation is hard because there may indeed be a link between treatment and comorbidities. However, the direct effect might still be sufficient for my study.

      Additionally, as a secondary analysis, I would like to use this survival model in a joint model with a longitudinal covariate (using gsem), and I am not sure whether using the g-formula would allow me to make this transition to joint modeling in gsem.

      Do you have any ideas at this regard?
      Thank you!

      Comment


      • #4
        I am not exactly sure what 'joint model' you are thinking of, but it seems likely that it will bear the same problem. If the longitudinal covariate is a variable affected by treatment, that covariate becomes a time-varying mediator. In that case, if the effect of that covariate is not of substantive interest by itself, you could as well just omit it from the model and should be able to identify a (total) treatment effect (the same is true for the comorbidities btw). If, on the other hand, that longitudinal covariate is a time-varying confounder, then it looks like it should be included in all your models anyway.

        Comment

        Working...
        X