BookmarkSubscribeRSS Feed
Ashwini_uci
Obsidian | Level 7

In the program below, I want to check the interaction between gender*race and gender*income.

In the model, I have 4 individual race variables and 3 individual income variables.

I also have a another form of  “RACE” and “Income” variables, with 5 and 4 different levels, such as 1= white, 2=black, 3= hispanic, 4 =asian and 5=others and Income as 1= first quartile 2-= second quartile, 3= 3rd quartile and 4= 4th quartile.

I created the below yellow highlighted dichotomous variables from the above nominal variables to use them in the model;

Such as for race;

black , Hispanic, asian, otherraces, and Caucasian is a reference (these are dummy coded variables) from main variable “RACE”

for income;

secquart, thirquart, fourquart, (First quartile is the reference, again dummy coded from main variable “INCOME”

So which form of race and income variables should I use in interaction?  I came up with following 2 types of models with interaction terms, please have a look at them and guide me as to which one of these is the correct one?

proc logistic data=library.nismicathcabg1 descending;

model died=  age gender black hispanic asian otherraces secquart thirquart fourquart bldloss chf chrnlung coag depress drug hypothy liver lymph gender*black gender*hispanic gender*asian gender*otherraces gender*secquart gender*thirquart gender*fourquart;

title 'Logi Reg in-hosp mortality vs gender in MI patients with race + income';

run;

quit;

OR

This includes the nominal RACE AND INCOME variable in the interaction terms.

proc logistic data=library.nismicathcabg1 descending;

model died=  age gender black hispanic asian otherraces secquart thirquart fourquart bldloss chf chrnlung coag depress drug hypothy liver lymph gender*race gender*income;

title 'Logi Reg in-hosp mortality vs gender in MI patients with race + income';

run;

quit;

or

proc logistic data=library.nismicathcabg1 descending;

class gender race (ref= first) income  (ref=first) /param=ref;

model died=  age gender race  income bldloss chf chrnlung coag depress drug hypothy liver lymph gender*race1  gender*income;

title 'Logi Reg in-hosp mortality vs gender in MI patients with race + income';

run;

quit;

which one of these is right?

Appreciate your suggestions. i have never worked with 'interactions'  before.

After I run these models, I get different numbers and the output doesnot show "ODDS estimate for gender, and the variables that are used in interaction terms. I am not sure if i am doing it right, as it is strange not to get the ODDS estimate for only these variables.

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12

The last one is the best one.  However, you should use race in the interaction rather than race1.  The reason that you were getting different results in the other ones is that each test is done after controlling for all the only other variables (including the other pieces of the IA terms).

You need to use the ODDSRATIO statement in LOGISTIC to get the ORs for the interaction variables.  Check the documentation for its interpretation.

Doc Muhlbaier

Duke

Ashwini_uci
Obsidian | Level 7

Thanks much for your response Doc! I still have to look for more details about using the odds ratio statement as I havenot done it before. I will appreciate if you have any idea about how to go about getting the odds ratio.

StatDave
SAS Super FREQ

See this usage note:

   http://support.sas.com/kb/24455

and Example 3 of this usage note:

   http://support.sas.com/kb/24447

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!

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
  • 3 replies
  • 6526 views
  • 3 likes
  • 3 in conversation