0

I have survival data in this format, with a time-varying exposure to Intervention:

ID start stop status Intervention
1     2   14      0       0
2     2    5      0       0
3     2    3      0       0
3     3   10      1       1
4     5    8      0       0
5     6   10      0       0

For example, for patient ID #3: from day 2 to day 3, the patient has not yet received the intervention (Intervention = 0), but starting on day 3 and lasting until day 10 (when the patient dies), the patient has received the intervention (Intervention = 1).

I thought that I could then estimate the time-varying effect of exposure in the following manner:

coxph (Surv (start, stop, status) ~ Intervention + cluster (ID), data = df.td)

However, I recently found that this method is not correct for right-censored data (Two different results from coxph in R, using same stop and start times, why?). Most basic guides to time-dependent survival analysis use a line like this (for example, as in https://www.emilyzabor.com/tutorials/survival_analysis_in_r_tutorial.html).

Is this method correct for estimating the effect of Intervention on outcome, given the structure of the data?

aparish
  • 71
  • 4
  • The previous question was using data that was not clearly arranged or coded for time varying covariates. You new question appears to be set up correctly to me. Is this just a question asking for reassurance with no error or results that you are having difficulty with? I hope that's not all of the data. The coefficient is huge, effectively a relative risk of infinity, (and you get a corresponding warning) and it comes because the effects are so lopsided. Might be more helpful to construct an example where you can compare more "balanced" results against a hand calculation. – IRTFM Sep 18 '20 at 16:42
  • Further comment: Reading the hep page for cluster I see this at the top: "This style is now discouraged, use the cluster option instead." – IRTFM Sep 18 '20 at 17:03

0 Answers0