I tried to use phreg (code shown below) to calculate the Hazard Ratios of these variables and here age was included as a spline.
proc phreg data=test; effect spl_age = spline(age / basis=bspline knotmethod=percentilelist(25 75) ); class sex(ref="0") race(ref="0") Hypertension(ref="0") Diabetes(ref="0") Region(ref="0"); model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1; id usubjid; run;
The code works but I got a message show below: Hazard ratios that cannot be conveniently calculated or displayed are set to missing in the ParameterEstimates table. Use the HAZARDRAT10 statement to compute the needed hazard ratios. I wonder if anything wrong with the code, especially age was treated as a spline. Many thanks.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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 save with the early bird rate—just $795!
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.