BookmarkSubscribeRSS Feed
lmyers2
Obsidian | Level 7

Hello

 

I am trying to get the exponentiated ORs and CIs from proc genmod. Below is my code and the error message I'm getting. I'm using sas 9.4.  

 

PROC GENMOD DATA=regression DESCENDING;
CLASS age_new (param=ref ref='adult') claimant_gender (param=ref ref='FEMALE') new_state CLAIMANT_TYPE (param=ref ref='INPATIENT') RESPONSIBLE_SERVICE_CATEGORY (param=ref ref='SURGERY')  bin_proc (param=ref ref='0');
MODEL MDTrainee=age_new claimant_gender JULY_LOSS WEEKEND_LOSS CLAIMANT_TYPE RESPONSIBLE_SERVICE_CATEGORY bin_proc / DIST = binomial LINK = logit;
REPEATED subject=new_state / LOGOR=EXCH;
lsmeans age_new claimant_gender CLAIMANT_TYPE RESPONSIBLE_SERVICE_CATEGORY / exp cl;
OUTPUT OUT=predprobs P=pred;
RUN;

WARNING: The model does not have a GLM parameterization. This parameterization is required for
the TEST, LSMEANS, LSMESTIMATE, and SLICE statement. These statements are ignored.

 

Also, will this only exponentiate the categorical variables in the class statement? Is there a way to exponentiate the estimates for binary variables?

 

Thanks

Laura

2 REPLIES 2
Rick_SAS
SAS Super FREQ

As the warning says, you can't use the LSMEANS statement with PARAM=REF. You can either use the ESTIMATE statement with the REF parameterization or you can change to the GLM parameterization. 

 

The ESTIMATE statement in GENMOD does not support the CL option, so use the STORE statement to write the model to an item store and then use the ESTIMATE statement in PROC PLM to get the upper/lower CIs. For an example, see the third section of the article "4 reasons to use PROC PLM for linear regression models in SAS."

StatDave
SAS Super FREQ

... or simply remove your use of PARAM=REF after each variable in the CLASS statement. Then you will be using GLM parameterization and that should take care of the warning. See this note about getting odds ratio estimates from GENMOD. As noted there, you might want to use the ODDSRATIO option in the LSMEANS statement rather than the EXP option to get appropriate labeling. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 3853 views
  • 0 likes
  • 3 in conversation