Skip to main content
added 124 characters in body
Source Link

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?

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 since there is an uneven distribution of transplant 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?

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?

added 237 characters in body
Source Link

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.

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.

Source Link

Same results using time dependent covariates in Cox model as in unadjusted model?

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

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 since there is an uneven distribution of transplant 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?