/*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.