I need to run a coxph model with time dependent weights. I am using proc phreg. Our data set contains patients that transfer from one hospital to another as well as patients that are readmitted. The PI is interested in thirty day mortality from the first day at each individual hospital. Therefore, each patient will only have one outcome but on a specific relative day, they could appear in the risk set more than once. Does this justify needing the random effect at the patient level? I also need a random effect at the hospital level and so if both are required, i run out of resources. If the patient level random effect is needed, is there another way to program around this?
-Sammi
You might find the following useful:
http://support.sas.com/resources/papers/proceedings10/255-2010.pdf
"Analysis of Survival Data with Recurrent Events Using SAS"
Just to clarify - is this what you want for each of these scenarios?
Patient A: Hospital A -> Discharged, alive for 30 days -> Admitted to Hospital B -> Discharged after 1 day -> Alive after 30 days
Patient A will count as a success (for Hospital A).
Patient B: Hospital A -> Discharged, alive for 3 days -> Dies at day 15
Patient B will count as a failure (for Hospital A).
Patient C: Hospital A -> Discharged, alive for 29 days -> Admitted to Hospital B -> Discharged after 1 day -> Alive after 30 days
Patient C will count as a success (for Hospital B).
Patient 😧 Hospital A -> Discharged, alive for 29 days -> Admitted to Hospital B -> Discharged after 1 day -> Dies at day 7
Patient D will count as a failure (for Hospital B).
Patient E: Hospital A -> Discharged, alive for 29 days -> Admitted to Hospital B -> Discharged after 1 day -> Contact lost after 10 days.
Patient E will count as "missing data".
If the above are correct, can't you ascribe success, failure, or missing to each patient in a DATA step?
- If the patient has not died, then find the "oldest" 30 day period of survival and ascribe to the Hospital immediately prior.
-- If there are no periods of survival >29 days, then this patient counts as missing.
- If the patient has died, ascribe to the Hospital immediately prior.
I think I see - the investigator wants to know about the most recent hospital stay only.
So in this scenario:
Patient A: Hospital A -> Discharged, alive for 30 days -> Admitted to Hospital B -> Discharged after 1 day -> Alive after 30 days
Patient A will count as a success (for Hospital B, not A).
Is this correct?
I don't know of a way to do this outside of a DATA step.
Norman, thank you for your help. My main focus is using a patient level RE because it gives me an out of memory error. I needed to find ways to avoid using this random effect and I have done this by FINALLY convincing the investigator to not reset the survival counter for transfers and place blame for death on initial hospital regardless if you were transferred or readmitted. Now there is no need for RE and model runs. This is a very difficult question to discuss via blog because there is much much more going on and the project is changing directions frequently. I apologize.
No need to apologise! I understand the pressure of trying to deliver a quality service while under pressure - and with the goalposts changing occasionally.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.