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. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4175 views
  • 0 likes
  • 3 in conversation