BookmarkSubscribeRSS Feed
nmas
Calcite | Level 5

Hi,

I am new to SAS and undertaking competing risk analysis. This is my code (I generated this by choosing options under Data instead of actually writing the code):

"proc phreg data=LIB.'COMPETING RISK SET UP 3'n;
class sexd / param=ref;
model Follow_time*Status(0)=sexd age charlson 
Med / eventcode=1;
run;"

The Results show Hazard Ratio (HR) but I cannot work out how to get the 95% confidence interval for the HR to show in the Results. Does anyone know how to fix this please?

Thanks!

3 REPLIES 3
nmas
Calcite | Level 5

Thank you for your reply. 

Yes, I tried to include CL (see code below):

"proc phreg data=LIB.'COMPETING RISK SET UP 3'n;
class sexd / param=ref;
model Follow_time*Status(0)=sexd age charlson 
Med / eventcode=1 CL;
run;”

However, it shows the following errors in the log:
ERROR 22-322: Syntax error, expecting one of the following: ;, ABSFCONV, ALPHA, BEST, CORRB, COVB, DETAILS, ENTRYTIME, FAILCODE,

FCONV, FIRTH, GCONV, HIERARCHY, INCLUDE, INITIAL, ITPRINT, MAXITER, MAXSTEP, NODESIGNPRINT, NODP, NODUMMY,
NODUMMYPRINT, NOFIT, OFFSET, PLCONV, RIDGING, RISKLIMITS, ROCLABEL, SELECTION, SEQUENTIAL, SINGULAR, SLENTRY, SLSTAY,
START, STOP, STOPRES, TIES, TYPE3, XCONV.
ERROR 202-322: The option or parameter is not recognized and will be ignored.

Any help on how to modify the code would be great.
Thanks!
A_Kh
Barite | Level 11

Hi,
Looking at your code I don't see using HAZARDRATIO  statement there. 

Besides, please post the entire log from the phreg step, not only the error part. 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3082 views
  • 2 likes
  • 3 in conversation