BookmarkSubscribeRSS Feed
Anton64
Calcite | Level 5

Hi,

I have to generate a graph showing the cumulative hazard function coming from the following model:

proc phreg data=out.DS ;

     class ARM PARTICIP;

     model end_et*endptfl(0) = ARM BL_NH3 / rl ;

               ID PARTICIP ;

               RANDOM PARTICIP / DIST= GAMMA ;

     hazardratio 'Frailty Model Analysis' ARM;

     run ;

 

Having specified the RANDOM statement, any ASSESS, BASELINE, and OUTPUT statements are ignored, so I don’t know how I can obtain the data to generate the graph.

thanks for any help

Alessandro Antonellini

3 REPLIES 3
SteveDenham
Jade | Level 19

Make sure ODS graphics are enabled and add PLOTS=CUMHAZ to the PROC PHREG statement.

 

SteveDenham

Anton64
Calcite | Level 5

Hi Steve,

if I apply your suggestions, the graph is still not generated and the log is returning the note

The PLOTS= option (PROC statement) is ignored for a frailty model analysis.
SteveDenham
Jade | Level 19

Well, that shoots that down @Anton64 , Does your code produce a table with the hazard ratios?  If so, you could use an ODS OUTPUT statement to get those into a dataset, and then use PROC SGPLOT for the graph.

 

SteveDenham.  

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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