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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 569 views
  • 3 likes
  • 5 in conversation