Obsidian | Level 7

## logistic regression with interraction

The purpose of our study is to compare our results for minimum dietary diversity for women during 2 seasons: spring and summer.

We want to check if our confounding variables for women’s dietary diversity interact during the 2 seasons.

I have a question regarding the way we should include interactions in proc logistic when comparing two groups? We felt that it was possible that more than one confounding factor affects the way seasons influence dietary diversity. (For instance, maybe women with greater wealth have lower dietary diversity in the spring as compared to summer because foods are cheaper in the summer. In contrast, maybe women with lesser wealth must sustain on the same types of low-cost food all year-long.)

We used the following program, specifying the types of interactions for which we need to know the odds ratio: spring_summer* v_region_pub and spring_summer * v_urban_rural in this case.

proc logistic data=results2;

class v_region_pub (param=ref ref='1-Sud')

v_urban_rural (param=ref ref='rural')

spring_summer (param=ref ref='spring');

model

MDD_W_5 (event='Oui')=

v_region_pub

v_urban_rural

spring_summer

spring_summer* v_region_pub

spring_summer * v_urban_rural  ;

oddsratio spring_summer / diff=ref at (v_region_pub=all) cl=pl;

oddsratio spring_summer / diff=ref at (v_urban_rural =all) cl=pl;

run;

Though the oddsratio step specifies that we would like the program to generate the odds ratio for :

spring_summer* v_region_pub and

spring_summer * v_urban_rural

it generates a table that presents all permutations of

spring_summer* v_region_pub * v_urban_rural

3 REPLIES 3
SAS Super FREQ

## Re: logistic regression with interraction

Your model says that the effect of spring_summer depends on both of the other variables since interactions with both are in the model. Because of that, it would not make sense to look at its effect at only levels of one of the variables. If you want to assume it does not interact with one of them, then you can get the odds ratios at just the levels of the other.

Obsidian | Level 7

## Re: logistic regression with interraction

You said, "If you want to assume it does not interact with one of them, then you can get the odds ratios at just the levels of the other."  can you please explain to me what do u mean by that, how can I get the odds ratio at the level of the other?

+ I wanted to make a table like this, isn't it possible to make with proc logistic when entering 2 interactions (the region with spring_summer and rural_urban with spring_summer)!!?

 Odds Rtio Spring vs summer in region=SUD Spring vs summer in region=GAE Spring vs summer in rural_urban=rural Spring vs summer in rural_urban=urban Spring vs summer livestock=yes Spring vs summer livestock=no
SAS Super FREQ

## Re: logistic regression with interraction

I mean that you would have to change your model. If you removed one of the interactions, then an ODDSRATIO statement for spring_summer would show odds ratios just at levels of the other variable it still interacts with. However, it would be misleading to run two such models, each with one of the interactions dropped, just so you can generate the odds ratios you say you want. All of your inferences should result from a single model that best reflects reality. You shouldn't have two different versions of reality for the convenience of getting numbers. If the data indicate that spring_summer does interact with both variables, then the correct odds ratios are what you got initially.

Discussion stats
• 3 replies
• 1383 views
• 2 likes
• 2 in conversation