0
$\begingroup$

I encountered a case where the coxph model result is exactly the same with and without time dependent covariate adjustment. I tested using the Stanford heart transplant dataset (jasa) as exampled in Therneau et al 2019 and it also showed no difference. I wonder if I'm doing something wrong or it's data-specific (I do get result difference in other datasets).

time dependent model

The codes below are copied from Therneau et al 2019, page 9, with a slight change in the coxph line to test effect of prior surgery for simplicity of comparison.

library(survival)
jasa$subject <- 1:nrow(jasa)

tdata <- with(jasa, data.frame(subject = subject,
                               futime= pmax(.5, fu.date - accept.dt),
                               txtime= ifelse(tx.date== fu.date,
                                              (tx.date -accept.dt) -.5,
                                              (tx.date - accept.dt)),
                               fustat = fustat))

sdata <- tmerge(jasa, tdata, id=subject,
                death = event(futime, fustat),
                trt = tdc(txtime),
                options= list(idname="subject"))
coxph(Surv(tstart, tstop, death) ~ surgery, data= sdata, ties="breslow")

Result:

Call:
coxph(formula = as.formula(form), data = sdata, ties = "breslow")

           coef exp(coef) se(coef)      z      p
surgery -0.7391    0.4775   0.3591 -2.058 0.0396

Likelihood ratio test=5.05  on 1 df, p=0.02461
n= 170, number of events= 75

unadjusted

jasa <- jasa %>% mutate(futime = pmax(.5, fu.date - accept.dt))

coxph(Surv(futime, fustat) ~ surgery, data= jasa, ties="breslow")

Result:

Call:
coxph(formula = as.formula(form), data = jasa, ties = "breslow")

           coef exp(coef) se(coef)      z      p
surgery -0.7391    0.4775   0.3591 -2.058 0.0396

Likelihood ratio test=5.05  on 1 df, p=0.02461
n= 103, number of events= 75 

The results are exactly the same. I noted that the number of events are the same in both cases. The difference I expect is that the time dependent adjustment models in the immortal time to transplant and censors them, and then starts to follow up on event from the time of transplant (i.e. time to event is from the time of transplant). And since there is an uneven distribution of transplant time in the two groups of patients with or without prior surgery, I do expect some difference with the unadjusted model. Is there something wrong with my thinking or the codes?

$\endgroup$

1 Answer 1

0
$\begingroup$

the reason why the results are the same is that in the 'Surv(tstart, tstop, death) ~ surgery' the transplant info is completely absent. The only thing you did was to break the survival in pieces, but the information is completely equivalent to the one where you have a single interval: so to make an example, to say that Patient 4 was alive between time 0 and 35 and alive from 35 to 38 and died at 38 is equivalent to say that the patient was alive from 0 to 38 and dies at 38. When you split the data, you know the data were split according to time of transplant, but the model does not know :) A different thing would have been to also have a time varying covariate which tells whether the transplant yet occurred. So for pt 4, you should have for the first row (up to time 35) a 0 and for the second row a 1. If then you include transplant in the model, that will be truly used as a time varying covariate.

$\endgroup$
1
  • $\begingroup$ Thanks Francesca! Sorry that it took so long for me to respond. I just tested. If I add the time varying covariate (trt created in the sdata created by the tmerge function) to the model, it essentially stratifies the patients into 4 groups (with/without surgery + with/without transplant). I guess this is one way of analyzing it. Thanks! $\endgroup$
    – Pumbaa
    Commented Jan 21, 2020 at 22:12

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.