2
$\begingroup$

I would be grateful for your help regarding the correct coding of cumulative time dependent covariates in cox regression.
I am exploring the association of injections (exposure, same dose for all exposures) given at different time points and in different number per participant, with development of disease (all participants received at least 1 injection), using the survival package and following Therry Therneau vignette for the use of time dependent covariates in Cox regresssion (https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf).

The first question is, is the coding of the cumulative time dependent covariate in my dataframe correct?

      ID tstart tstop event exposure cum_exposure age_per5 sex   
   <int>  <dbl> <dbl> <dbl>    <dbl>        <dbl>    <dbl> <fct> 
 1     1      0     1     0        1            1     11.6 Female
 2     1      1    33     0        1            2     11.6 Female
 3     1     33    68     0        1            3     11.6 Female
 4     1     68    96     0        1            4     11.6 Female
 5     1     96   138     0        1            5     11.6 Female
 6     1    138   194     0        1            6     11.6 Female
 7     1    194   440     0        0            6     11.6 Female
 8     2      0     1     0        1            1     11.4 Male  
 9     2      1    28     0        1            2     11.4 Male  
10     2     28    70     0        1            3     11.4 Male  
11     2     70    98     0        1            4     11.4 Male  
12     2     98   132     0        1            5     11.4 Male  
13     2    132   175     0        0            5     11.4 Male  
14     3      0     1     0        1            1     13.7 Male  
15     3      1    29     0        1            2     13.7 Male   
  

call for model: model_tdc <- coxph(Surv(tstart, tstop, event) ~ age_per5 + sex + cum_exposure, mydata)

Additionally, I am using the column which has the persistent cumulative effect of the exposures (mydata$cum_exposure) for my model. Should I be using the mydata$exposure column which specifies if the patient received an injection on that time period (0 no injection, 1 injection) instead?.

And finally, would the interpretation that each additional injection is associated with a 0.84 HR for development of disease be correct according to these results with a larger sample? (inj_cumsum corresponds to the cum_exposure column)

               coef exp(coef) se(coef)      z Pr(>|z|)    
inj_cumsum -0.17932   0.83583  0.02924 -6.134 8.58e-10 ***
age_per5   -0.18657   0.82980  0.03758 -4.965 6.87e-07 ***
sexMale     0.33067   1.39190  0.20286  1.630    0.103      

Thank you.

$\endgroup$

1 Answer 1

0
$\begingroup$

The first question is, is the coding of the cumulative time dependent covariate in my dataframe correct?

That's a question only you can answer. Yes, you seem to have produced a cum_exposure predictor that adds up all the previous exposures. But is that the best predictor to associate with the instantaneous risk of an event? That implies that the effect of any one exposure lasts forever and that subsequent exposures add directly on to that in terms of log-hazard of an event regardless of timing. If that makes sense based on your understanding of your subject matter then fine, but that's not the type of relationship that I would typically expect.

Should I be using the mydata$exposure column which specifies if the patient received an injection on that time period (0 no injection, 1 injection) instead?

That would be correct if an exposure only affected outcome if it occurred during that time window and prior exposures don't matter. You also would have to consider whether the time since the exposure during that time period matters--otherwise, you implicitly assume that an exposure matters the same with respect to outcome no matter how wide the time period is or how long ago it happened.

would the interpretation that each additional injection is associated with a 0.84 HR for development of disease be correct according to these results with a larger sample?

That would be the interpretation for a predictor for which each increase of one unit has a corresponding hazard ratio of 0.84. But there's something else going on here, pointing up a potential problem in defining that variable.

It seems that the longer that individuals survive, the more exposures they receive. So there is a big danger of survivorship bias here: maybe all that you're finding is that people who have more exposures are simply those who develop the disease later for whatever reason possibly unrelated to the exposures themselves.

So the essential issue here is what makes sense based on your understanding of the subject matter. Have that clear first, then undertake the difficult task of designing an appropriate time-dependent covariate that matches your understanding of the underlying phenomena.

$\endgroup$

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.