BookmarkSubscribeRSS Feed
khalidamin
Obsidian | Level 7

See the attached file. Thank you in advance.

7 REPLIES 7
Reeza
Super User
Not sure what your question is, I see output from proc logistic...
khalidamin
Obsidian | Level 7
I want to generate a table as shown is the attached file using SAS
Reeza
Super User
But the point estimate isn't 1, it's 0.
khalidamin
Obsidian | Level 7
Oh yes, it’s zero. Sorry for the typo.
Is there any option in proc logistic to display reference category?
Reeza
Super User
Not as far as I know, you'll have to manually add those rows in, especially as the reference level can vary depending on the code so there's not an easy way to automate that ... at least that I can think of at the moment.
khalidamin
Obsidian | Level 7
Thanks Reeza for your time - I really appreciate.
FreelanceReinh
Jade | Level 19

Hello @khalidamin,

 

If you just need a dataset containing class variable names and their reference categories (which you could then "interleave" with an odds ratio table where the reference categories are omitted), you can use the ClassLevelInfo ODS output dataset:

ods output ClassLevelInfo=cli;
proc logistic ...;
...
run;

data reflevels(keep=clvar value);
set cli;
if class ne ' ' then clvar=class;
if max(of x:)=0;
retain clvar;
run;

 

Alternatively, you could start with the OddsRatios ODS output dataset. But unfortunately variable Effect in this dataset contains concatenated strings like 'gender    1 vs 0' so that you would need to work with character functions such as SCAN to extract variable names and values. This might become difficult in general, e.g., if values (or even variable names) contain blanks or the substring "vs", etc.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 7 replies
  • 1371 views
  • 0 likes
  • 3 in conversation