BookmarkSubscribeRSS Feed
Vari
Calcite | Level 5

Hi,

I would like to make an out of sample prediction of the survival probability based on my PROC PHREG estimates. Is this possible in SAS?

2 REPLIES 2
ballardw
Super User

Please describe what you mean by 'out of sample'?

Do you mean to apply the model from Proc Phreg to a different data set? This is scoring. You can use the STORE option to save the Phreg information and then Proc PLM to score the data pointing to that saved information.

An example using Proc Mixed from the online help, replace the Proc Mixed code with your proc (though I suggest saving the store information into a different permanent library than SASUSER ) and then point to your store and other data set in the proc Proc Plm Score statement. The Show and LSMEANS are just from the example an you likely don't need them.

proc mixed data=MyBigDataSet;
   class Env A B sub;
   model y = A B x / ddfm=KenwardRoger;
   random int A*B / sub=Env;
   repeated / subject=Env*A*B type=AR(1);
   store sasuser.mixed;
run;

proc plm restore=sasuser.mixed;
   show cov Parms;
   lsmeans A B / diff;
   score data=NewData out=ScoreResults;
run;
Vari
Calcite | Level 5
Thanks you! This seems to have worked. I get predicted values for the new
observations.

I am not sure, however, how to interpret these predicted values. For about
99% of the cases the predicted values are negative (and they range between:
-2.96 to 4.27). How do these relate to failure times or hazard rates?

##- Please type your reply above this line. Simple formatting, no
attachments. -##

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
  • 2 replies
  • 1871 views
  • 0 likes
  • 2 in conversation