BookmarkSubscribeRSS Feed
Sammi_Kerti
Fluorite | Level 6

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

7 REPLIES 7
Norman21
Lapis Lazuli | Level 10

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"

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

Sammi_Kerti
Fluorite | Level 6
Thank you. This was a good article but my problem is that subjects survival time counter resets to 0 each time they transfer hospitals or are readmitted. They cannot have reoccurring events (death) but it appears that they are in the risk set multiple times at say day 3 if they were in many hospitals more than 3 days.
Norman21
Lapis Lazuli | Level 10

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.

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

Sammi_Kerti
Fluorite | Level 6
This was my proposed setup but the investigator wants survival to reset at each hospital a person enters. This is want makes it more difficult. I already need a random effect for hospital (157 levels) and now I need to either add a random effect for hospital or add id= statement. I was just wondering if there is a more efficient way to run this.

Norman21
Lapis Lazuli | Level 10

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.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

Sammi_Kerti
Fluorite | Level 6

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. 

 

Norman21
Lapis Lazuli | Level 10

No need to apologise! I understand the pressure of trying to deliver a quality service while under pressure - and with the goalposts changing occasionally.

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 7 replies
  • 1553 views
  • 2 likes
  • 2 in conversation