Hi everyone,
I would like to ask help about immortal time bias.
I am doing a large population-based registry study in which I am doing Cox-regression for survival in 681 incident ALS cases taking or not riluzole treatment.
Together with other known prrognostic factor that are included in my database, I would like to understand wether patients taking riluzole for a longer time have a gain in survival with respect to patients taking it for a shorter time.
The cases are defined at diagnosis, which occurs at a variable time (onsetdg) from disease onset. Treatment can be started at a variable time after diagnosis (delaydgtrt in months). Survival (surv) is considered from onset to death or censoring date.
I want to look at the length of exposure to riluzole, and the effect of longer exposure on survival, but of course a patient can take riluzole for a long time only if he survives for a long time.
The table shows an example of my dataset:
id age onsetdg siteonset phenot dementia criteria weightloss riluzole peg niv surv frsr_decline death trt_on_surv trt_perc_surv trtduration delaydgtrt
289 78.42 6 0 1 1 2 0 1 1 1 23 1.350294 1 .7492754 75 17.2 .1666667
291 68.92 5 0 5 0 4 0 0 0 27 .5895197 1 0 0 0
292 79.5 10 1 0 0 1 10 1 0 0 13 1 .1717949 17 2.2 .9
297 49.25 5 0 1 0 0 0 1 0 0 21 .7252747 1 .7269841 73 15.3 .7333333
298 69.0 8 0 1 0 0 1 1 0 0 31 .0867052 1 .2387097 24 7.4 .7
I used riluzole treatment duration (trtduration in months) to calculate the percentage of the survival time from onset the patients used the drug (trt_perc_surv). This will inevitably tend to result in a positive association between treatment duration and survival.
To deal with immortal time bias I considered my variable “trt_perc_surv” as time-varying covariate (tvc).
So I did:
stset surv, failure ( death)
failure event: death != 0 & death < .
obs. time interval: (0, surv]
exit on or before: failure
------------------------------------------------------------------------------
681 total obs.
0 exclusions
------------------------------------------------------------------------------
681 obs. remaining, representing
410 failures in single record/single failure data
27050 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 134
After univariate analysis I included in Cox model only significant variables and through stepwise backward selection I had my final model:
stcox age onsetdg phenot weightloss peg niv frsr_decline trt_perc_surv delaydgtrt
failure _d: death
analysis time _t: surv
Iteration 0: log likelihood = -1289.062
Iteration 1: log likelihood = -1172.4775
Iteration 2: log likelihood = -1127.5665
Iteration 3: log likelihood = -1119.3
Iteration 4: log likelihood = -1118.4087
Iteration 5: log likelihood = -1118.4022
Iteration 6: log likelihood = -1118.4022
Refining estimates:
Iteration 0: log likelihood = -1118.4022
Cox regression -- Breslow method for ties
No. of subjects = 374 Number of obs = 374
No. of failures = 242
Time at risk = 15291
LR chi2(9) = 341.32
Log likelihood = -1118.4022 Prob > chi2 = 0.0000
_t Haz. Ratio Std. Err. z P>z [95% Conf. Interval]
age 1.025793 .00665 3.93 0.000 1.012841 1.038909
onsetdg .8805331 .0106922 -10.48 0.000 .8598243 .9017407
phenot .8325194 .062371 -2.45 0.014 .7188259 .9641954
weightloss 1.032448 .013156 2.51 0.012 1.006982 1.058558
peg 1.483843 .2011063 2.91 0.004 1.13769 1.935316
niv 1.55862 .2089087 3.31 0.001 1.198533 2.026891
frsr_decline 1.214138 .0405548 5.81 0.000 1.137199 1.296284
trt_perc_s~v .9617358 .0027841 -13.48 0.000 .9562945 .967208
delaydgtrt .8807056 .0301449 -3.71 0.000 .8235608 .9418154
Then I ran cox with tvc:
stcox age onsetdg phenot weightloss peg niv frsr_decline trt_perc_surv delaydgtrt, tvc (trt_perc_surv) texp (_t)
failure _d: death
analysis time _t: surv
Iteration 0: log likelihood = -1289.062
Iteration 1: log likelihood = -1167.7774
Iteration 2: log likelihood = -1115.3945
Iteration 3: log likelihood = -1107.7354
Iteration 4: log likelihood = -1106.9675
Iteration 5: log likelihood = -1106.9593
Iteration 6: log likelihood = -1106.9593
Refining estimates:
Iteration 0: log likelihood = -1106.9593
Cox regression -- Breslow method for ties
No. of subjects = 374 Number of obs = 374
No. of failures = 242
Time at risk = 15291
LR chi2(10) = 364.21
Log likelihood = -1106.9593 Prob > chi2 = 0.0000
_t Haz. Ratio Std. Err. z P>z [95% Conf. Interval]
rh
age 1.031444 .0069875 4.57 0.000 1.01784 1.045231
onsetdg .8726985 .0103092 -11.53 0.000 .8527249 .8931399
phenot .7893556 .0627597 -2.98 0.003 .675454 .9224645
weightloss 1.025177 .0138613 1.84 0.066 .9983658 1.052707
peg 1.369392 .1873501 2.30 0.022 1.047304 1.790535
niv 1.703847 .2359697 3.85 0.000 1.298811 2.235195
frsr_decline 1.251356 .0439297 6.39 0.000 1.16815 1.340487
trt_perc_s~v .9804914 .0050855 -3.80 0.000 .9705745 .9905096
delaydgtrt .8911584 .0295559 -3.47 0.001 .8350726 .9510111
t
trt_perc_s~v .9993161 .0001417 -4.83 0.000 .9990385 .9995938
Note: second equation contains variables that continuously vary with respect
to time; variables are interacted with current values of _t.
The question:
I’m not sure that this is enough, or right, and I’m not sure about data interpretation: as it concerns duration of treatment in relation to survival can I say that “ we found a HR of 0.98 at t=0, and that it declines by <0.1% every unit of time (month)? Does it mean that, although an interaction with time is present, the longer the treatment duration, the longer the survival?
Thanks to anyone who can help me
Jessica
I would like to ask help about immortal time bias.
I am doing a large population-based registry study in which I am doing Cox-regression for survival in 681 incident ALS cases taking or not riluzole treatment.
Together with other known prrognostic factor that are included in my database, I would like to understand wether patients taking riluzole for a longer time have a gain in survival with respect to patients taking it for a shorter time.
The cases are defined at diagnosis, which occurs at a variable time (onsetdg) from disease onset. Treatment can be started at a variable time after diagnosis (delaydgtrt in months). Survival (surv) is considered from onset to death or censoring date.
I want to look at the length of exposure to riluzole, and the effect of longer exposure on survival, but of course a patient can take riluzole for a long time only if he survives for a long time.
The table shows an example of my dataset:
id age onsetdg siteonset phenot dementia criteria weightloss riluzole peg niv surv frsr_decline death trt_on_surv trt_perc_surv trtduration delaydgtrt
289 78.42 6 0 1 1 2 0 1 1 1 23 1.350294 1 .7492754 75 17.2 .1666667
291 68.92 5 0 5 0 4 0 0 0 27 .5895197 1 0 0 0
292 79.5 10 1 0 0 1 10 1 0 0 13 1 .1717949 17 2.2 .9
297 49.25 5 0 1 0 0 0 1 0 0 21 .7252747 1 .7269841 73 15.3 .7333333
298 69.0 8 0 1 0 0 1 1 0 0 31 .0867052 1 .2387097 24 7.4 .7
I used riluzole treatment duration (trtduration in months) to calculate the percentage of the survival time from onset the patients used the drug (trt_perc_surv). This will inevitably tend to result in a positive association between treatment duration and survival.
To deal with immortal time bias I considered my variable “trt_perc_surv” as time-varying covariate (tvc).
So I did:
stset surv, failure ( death)
failure event: death != 0 & death < .
obs. time interval: (0, surv]
exit on or before: failure
------------------------------------------------------------------------------
681 total obs.
0 exclusions
------------------------------------------------------------------------------
681 obs. remaining, representing
410 failures in single record/single failure data
27050 total analysis time at risk, at risk from t = 0
earliest observed entry t = 0
last observed exit t = 134
After univariate analysis I included in Cox model only significant variables and through stepwise backward selection I had my final model:
stcox age onsetdg phenot weightloss peg niv frsr_decline trt_perc_surv delaydgtrt
failure _d: death
analysis time _t: surv
Iteration 0: log likelihood = -1289.062
Iteration 1: log likelihood = -1172.4775
Iteration 2: log likelihood = -1127.5665
Iteration 3: log likelihood = -1119.3
Iteration 4: log likelihood = -1118.4087
Iteration 5: log likelihood = -1118.4022
Iteration 6: log likelihood = -1118.4022
Refining estimates:
Iteration 0: log likelihood = -1118.4022
Cox regression -- Breslow method for ties
No. of subjects = 374 Number of obs = 374
No. of failures = 242
Time at risk = 15291
LR chi2(9) = 341.32
Log likelihood = -1118.4022 Prob > chi2 = 0.0000
_t Haz. Ratio Std. Err. z P>z [95% Conf. Interval]
age 1.025793 .00665 3.93 0.000 1.012841 1.038909
onsetdg .8805331 .0106922 -10.48 0.000 .8598243 .9017407
phenot .8325194 .062371 -2.45 0.014 .7188259 .9641954
weightloss 1.032448 .013156 2.51 0.012 1.006982 1.058558
peg 1.483843 .2011063 2.91 0.004 1.13769 1.935316
niv 1.55862 .2089087 3.31 0.001 1.198533 2.026891
frsr_decline 1.214138 .0405548 5.81 0.000 1.137199 1.296284
trt_perc_s~v .9617358 .0027841 -13.48 0.000 .9562945 .967208
delaydgtrt .8807056 .0301449 -3.71 0.000 .8235608 .9418154
Then I ran cox with tvc:
stcox age onsetdg phenot weightloss peg niv frsr_decline trt_perc_surv delaydgtrt, tvc (trt_perc_surv) texp (_t)
failure _d: death
analysis time _t: surv
Iteration 0: log likelihood = -1289.062
Iteration 1: log likelihood = -1167.7774
Iteration 2: log likelihood = -1115.3945
Iteration 3: log likelihood = -1107.7354
Iteration 4: log likelihood = -1106.9675
Iteration 5: log likelihood = -1106.9593
Iteration 6: log likelihood = -1106.9593
Refining estimates:
Iteration 0: log likelihood = -1106.9593
Cox regression -- Breslow method for ties
No. of subjects = 374 Number of obs = 374
No. of failures = 242
Time at risk = 15291
LR chi2(10) = 364.21
Log likelihood = -1106.9593 Prob > chi2 = 0.0000
_t Haz. Ratio Std. Err. z P>z [95% Conf. Interval]
rh
age 1.031444 .0069875 4.57 0.000 1.01784 1.045231
onsetdg .8726985 .0103092 -11.53 0.000 .8527249 .8931399
phenot .7893556 .0627597 -2.98 0.003 .675454 .9224645
weightloss 1.025177 .0138613 1.84 0.066 .9983658 1.052707
peg 1.369392 .1873501 2.30 0.022 1.047304 1.790535
niv 1.703847 .2359697 3.85 0.000 1.298811 2.235195
frsr_decline 1.251356 .0439297 6.39 0.000 1.16815 1.340487
trt_perc_s~v .9804914 .0050855 -3.80 0.000 .9705745 .9905096
delaydgtrt .8911584 .0295559 -3.47 0.001 .8350726 .9510111
t
trt_perc_s~v .9993161 .0001417 -4.83 0.000 .9990385 .9995938
Note: second equation contains variables that continuously vary with respect
to time; variables are interacted with current values of _t.
The question:
I’m not sure that this is enough, or right, and I’m not sure about data interpretation: as it concerns duration of treatment in relation to survival can I say that “ we found a HR of 0.98 at t=0, and that it declines by <0.1% every unit of time (month)? Does it mean that, although an interaction with time is present, the longer the treatment duration, the longer the survival?
Thanks to anyone who can help me
Jessica