1
$\begingroup$

Background

I'm designing a study that models time-to-event for two groups of study subject: people who receive a treatment and those who do not. I'm fairly new to applied survival analysis, so I've chosen Cox regression for this analysis: first, it has a nice carryover of intuition from other regression models I'm more familiar with, and second because I'd like to compare these two groups in light of other covariates. I'm conducting my analyses in R, using the survival package by Terry Therneau.

I've set up my data in so-called "counting process" format (or so I've seen it called in my survival analysis texts). Here's a dummy version of the dataset I just worked up in Excel:

enter image description here

As you can see, this represents one subject's (ID number 1) records. You've got time1 and time2, a treatment indicator, an event indicator, and a couple of other covariates.

The Problem / Question

Many of the subjects in my dataset have lots of data (rows) from the time before they were first treated, and you can see that that's the case for Mr. 1 in the table above: before he receives the treatment in row 3, we have 2 rows' worth of data. So: Would the inclusion of this "pre-treatment" data somehow bias my outcome estimates (hazard ratios) for treatment? In other words, should I remove it?

Since the survival time/interval I'm interested in in this study is a subject's time after treatment until the event or study end (censoring), my intuition tells me that I ought to exclude the pre-treatment data from my analytic dataset. In other words, I don't really care what's happened to someone before they receive the treatment. But I don't have much more than my intuition to go on here, and I've been going around in circles on this the last couple of hours.

Do I keep pre-treatment data in, or cut it out?

$\endgroup$
4
  • 1
    $\begingroup$ You have to be careful how you structure data in the counting-process format. You only show treatment = 1 for the period between times of 12 and 15. The Cox model would then only assume treatment = 1 during that single time period. My sense is that you intend treatment = 1 to extend to all subsequent time periods for an individual. As the answer from @ToddD indicates (+1), the choice of time = 0 is critical for survival analysis. If you choose that to be time of study entry you could handle treatment as a time-dependent covariate, but you would have to code the data properly. $\endgroup$
    – EdM
    Mar 21, 2022 at 15:16
  • $\begingroup$ @EdM, yes, you're right! I'd wanted to present the data in its rawest form, so that potential answers to my question got to the heart of the issue. It's funny you wrote what you wrote, because I ran into that trouble in the real dataset very quickly, and after some fiddling realized that treated subjects needed to be marked treatment = 1 in all their rows for the regression results to make any sense at all. It was nice to read your comment because it validates that choice! $\endgroup$
    – logjammin
    Mar 21, 2022 at 17:03
  • 1
    $\begingroup$ I hope you mean that you set treatment = 1 at all times after the treatment was applied in your counting-process data format. The Cox model uses the covariate values in place for all those at risk at each event time. Marking an individual with treatment = 1 before treatment started would be a mistake if anyone had an event during the time period before that individual actually started treatment. $\endgroup$
    – EdM
    Mar 21, 2022 at 17:38
  • 1
    $\begingroup$ Yes, that's what I meant -- all rows after treatment is first applied. $\endgroup$
    – logjammin
    Mar 21, 2022 at 17:39

1 Answer 1

4
$\begingroup$

In a survival analysis, the time at-risk is determined by the hypothesis under investigation. You can ask yourself “when does my experiment start”? For a trial, time 0 is the start of the trial; all prior survival is ignored. For an observational study, time 0 may be clearly defined (ie, after a surgery) or can be less clear (ie, appearance in a clinic). Simply having lived prior to the study is not a sufficient reason to include that time as part of the study.

$\endgroup$
4
  • $\begingroup$ This aligns with where my intuition has been shifting. Thanks. Tell me, though: does it matter that time-zero is different for the treated and the not-treated? In this (observational and retrospective) study's case, the time at-risk for the treated would be "time of treatment until time outcome or censoring", while for the not-treated, it would be "time of appearance in the data until outcome or censoring". Does each group's time at-risk need to be strictly comparable? $\endgroup$
    – logjammin
    Mar 21, 2022 at 4:23
  • 2
    $\begingroup$ Yes, the two groups should be as similar to one another as is possible except for their treatment status. This likeness between groups is what gives a randomized trial its ability to discern the true effect of treatment. All other designs are affected by bias, which obscures the measurement of a treatment’s true effect. $\endgroup$
    – Todd D
    Mar 21, 2022 at 4:33
  • $\begingroup$ Right. So if the right covariates are included in the Cox model, would that be enough to make the treated and un-treated as similar as possible in the HR for treatment? Using the language of my table, if the right side of the model looked like = b(treatment) + b(covariate_1) + b(covariate_2) ? $\endgroup$
    – logjammin
    Mar 21, 2022 at 4:48
  • 3
    $\begingroup$ What you describe is the right approach, but whether the covariates allow you to accurately measure the treatment effect is a matter of content/disease knowledge. $\endgroup$
    – Todd D
    Mar 21, 2022 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.