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.