I am trying to create a time dependent (covariate) cox regression model for a survival analysis project I am interested in. A brief overview of my dataset:
I have a cohort starting from 2011-01-01, ending in 2016-12-31. The time dependent exposure is bereavement, all people start non-bereaved but eventually some will get exposed.
I have created the dataset using the survival package in R in which an individual who is going to be bereaved gives two rows in the data (one for the non-bereavement period and another for the bereavement period), while a non-bereaved during the follow up has only one row. I am interested in comparing mortality between bereaved and non-bereaved. I can do a survival analysis for that purpose, but I am also interested in seeing if the time since bereavement is also affecting mortality. However, I can't seem to do aforementioned, since I also have non-bereaved ones for which the time since bereavement cannot be computed. Do you happen to have any ideas how can I progress my analysis or happen to know any packages that are relevant to that purpose ? I have also check the following paper, and they seem to have managed something like that :
Kind regards and thank you in advance for any potential ideas!