I am having trouble wrapping my head around survival analysis. I have a trial with two arms where the endpoint is mortality at day 14. The endpoint will be calculated using survival methods to account for censoring. The trial continues for longer, with patients monitored for several weeks. The data is structured with one record per subject.
Currently, I have the following code:
Is this the correct set up to estimate day 14 mortality? I am getting a bit tangled up about the start of the trial being day 0 or day 1 and thus whether I'm accurately estimating the day 14 mortality.
Additionally, I have a few patients who die on the same day they are randomised (within a few hours), but we don't capture the specific time of death. These patients should be included as their true time of death isn't t=0. Does it make sense to add 0.5 to their follow-up time to account for this? Ie:
Would this approach be appropriate, or is there a better way to account for early deaths? I will go on to estimate the difference in mortality at day 14 & use Cox PH to explore related factors.
Currently, I have the following code:
Code:
// setup gen time_days = lastseen - randomdate stset time_days, failure(death==1) exit(time 14) // results sts list, by(group) risktable(14) fail sts graph, by(group)
Additionally, I have a few patients who die on the same day they are randomised (within a few hours), but we don't capture the specific time of death. These patients should be included as their true time of death isn't t=0. Does it make sense to add 0.5 to their follow-up time to account for this? Ie:
Code:
// setup gen time_days = lastseen - randomdate replace time_days = time_days + 0.5 if time_days==0 stset time_days, failure(death==1) exit(time 14)
Comment