I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

Reply
N/A
Posts: 1

I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

What could go wrong here? Thank you so much. Truly appreciate the response.

SAS Super FREQ
Posts: 3,755

Re: I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

Could you post your code?  (And data too, if possible.)

N/A
Posts: 1

Re: I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

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

Occasional Contributor
Posts: 18

Re: I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

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.

Super User
Posts: 11,343

Re: I am running a logistic regression analysis on a categorical variable adjusting another categorical variable. At the same time, I also wanted to run interaction term. When I ran the interaction term, I did not get odds ration estimates! I am confused

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.

Ask a Question
Discussion stats
  • 4 replies
  • 254 views
  • 2 likes
  • 5 in conversation