2
$\begingroup$

I use a Cox PH model with time-varying covariates using the Survival package in R. I am mainly interested in how changes (or shocks how I call them) impact the time the patient stays alive. I have read that the way the extended Cox PH model handles time-varying covariates is by handling each observation (row in the data matrix) as if they are independent and possibly left-truncated (if not the first of the observations corresponding to the ID). The standard errors are then fixed by using Robust standard errors clustered on the ID level.

Am I now correct in stating that some observations/rows can be deleted corresponding to some ID? In table form:

subject time1 time2 event  shock 
    1      0     15    0     13
    1     15     46    0     21
    1     46     73    0     0     
    1     73    100    1     25   

to this

subject time1 time2 event  shock 
    1      0     15    0     13
    1     15     46    0     21
    1     73    100    1     25

since I am interested in the relative impact of the shocks and not in the observations where there was no shock. Of course, now I assume that previous shocks do not impact current survival times. Could someone please help me out? Kind regards.

I realize that my question is the same as the edit in the question of Formatting data for Cox PH with time-dependent covariates. However, this was left unanswered.

$\endgroup$
1
  • 1
    $\begingroup$ Could you add the code of your model? $\endgroup$
    – captcoma
    Apr 18, 2020 at 12:15

1 Answer 1

1
+50
$\begingroup$

If you are only interested in whether or not a subject experiences the event when they have been exposed to some level of shock and do not want to consider subjects that have not been exposed to shock, then yes, you can filter as you describe. In the design of your experiment, a subject with shock = 0 is not available to experience the event, therefore you do not want to consider the time interval during which they were not available to experience the event.

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