BookmarkSubscribeRSS Feed
TomHsiung
Pyrite | Level 9
/*Spline for hazard ratios*/
%macro SplineHR;
proc phreg data = &raw_data_name plots = cumhaz;
class &class_var;
effect SplALB = spline(serumAlb/naturalcubic);
model &length*&censor(0) = &indep_list / rl=Wald;
*effectplot fit(x=serumAlb);
*effectplot fit(x=serumAlb) / link;
hazardratio serumAlb / at(serumAlb = 25 to 45);
run;
%mend;
%SplineHR

Hello, everyone.

With the above macro and other codes, I indeed got the expected outcome. But, unlike PROC LOGISTIC, they are listed as a table instead of a spline plot. Any suggestion for making the plot? Thanks.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 442 views
  • 0 likes
  • 1 in conversation