BookmarkSubscribeRSS Feed
4 REPLIES 4
KlaasF
Calcite | Level 5

Nothing goes wrong but SAS does not output OR's when interaction terms are included in the model.

If the interaction term is significant you may (must) present stratum specific OR's and you can get those by the ESTIMATE statement.

(If the interaction term is not significant, you remove it from the model again and will get the OR's you need).

Simple(st) example:

PROC LOGISTIC DATA=one DESCENDING;

  CLASS e f / PARAM=REF REF=FIRST;

  MODEL d = e f e*f;

  ESTIMATE 'OR for E in stratum F=1' e 1 e*f 1/EXP;

  ESTIMATE 'OR for E in stratum F=0' e 1 e*f 0/EXP; * or just e 1;

  ESTIMATE 'OR for F in stratum E=1' f 1 e*f 1/EXP;

  ESTIMATE 'OR for F in stratum E=0' f 1 e*f 0/EXP; * or just f 1;

RUN;

Hope this helps.

k

JohnW_
Calcite | Level 5

To elaborate further, the reason that this is happening is that without an interaction term, the odds ratio is constant for a variable.  When adding an interaction, the odds ratio changes depending on the values of the interacted variables.  So you need to tell SAS the values of the interacted variables where you want an odds ratio estimate.

ballardw
Super User

It is possible that attempting to post your entire question in the subject will make it impossible to respond. There seems to be a bug related to the length or content of the titles.

Better would be a subject similar to:

Missing odds ration with interaction terms in proc logistic

and them provide additional details about what you were trying to accomplish , what code you tried and what did not work as expected.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 4 replies
  • 1321 views
  • 3 likes
  • 5 in conversation