0
$\begingroup$

Some patient received an treatment as treated group and some did not as control group. In order to consider "immortal time bias", I coded the treatment as a time-dependent covariate. Could you let me know it is right or not? Thanks. For example, there are two patients: P1 received the treatment 30 days after the start of this study and died 30 days after receiving the treatment. P2 did not received the treatment and survived at the end of this study (80 days). Here I code the data as follow:

ID  Treatment   Time    Death
P1  0   30  0
P1  1   30  1
P2  0   80  0

Then I just used SAS code to create KM curves

/*Survival curve*/
proc lifetest data=treatment;
time Time*Dearg(0);
strata Treatment;
run;
$\endgroup$

1 Answer 1

0
$\begingroup$

If you are interested in survival from the study start date instead of from the treatment start date, then you are correct to code treatment as a time-varying covariate. I'm not sure, however, that you have done the coding properly.

A standard way to code time-varying covariates is in a counting-process format with a startTime and a stopTime for each time period with constant covariate values. In your example:

ID Treatment startTime stopTime Death
P1         0         0       30     0
P1         1        30       60     1
P2         0         0       80     0

I don't use SAS; I suppose it might have some way to interpret your original coded data in the way you intended. The above counting-process format is standard, however.

Do think, however, whether you really want to model survival from the study start date instead of from the treatment start date. To some extent that depends on how you define "the start of this study." If you define that in a patient-specific way, for example to account for delays in providing treatment after a patient presents for the study, that might make sense. But if you are defining "the start of this study" as the same calendar date for all patients it probably wouldn't.

$\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.