BookmarkSubscribeRSS Feed
iuri_leite
Fluorite | Level 6

Dear All,

 

I run a model in which a have one variable (Var1) interacting with three other variables (Var2, Var3 and Var4).

Var1 has three categories and Var2, Var3 and Var4 are binary variable indicating the presence or absence of symptoms.

Is it possible to suggest a text showing the best way to interpret interactions of one variable with two or more variables?

Thanks a lot.

Regards,

 

2 REPLIES 2
awesome_opossum
Obsidian | Level 7
I’m assuming your outcome is continuous. I guess it depends what you’re looking to show and how simply, probably depending on your narrative. You could do a series of plots each at levels of the variables. I think since they’re all categorical variables, though, I would create a concatenated variable and compute the averages grouping by it, then plot the averages and categories in a simple bar chart.

So like:

data want; set have;
Newvar = catt(var1, ‘-‘, var2 , ‘-‘, var3 , ‘-‘, var4);
run;

proc sql; create table want2
as select distinct
Newvar,
avg(outcome),
stderr(outcome)
from want
group by Newvar;
quit;

You could also just group by all four vars, and include them in the query.

A logistic, etc model would be a bit more complicated.
PaigeMiller
Diamond | Level 26

Rather than suggest a text, I suggest that you examine and try to understand an interaction plot. Here is an example (scroll down): https://documentation.sas.com/doc/en/statug/15.2/statug_glm_examples03.htm

 

Interactions exist when the colored lines are not parallel to each other. Note that the red line (disease 2) is highest for drugs 1 and 2 and lowest for drugs 3 and 4. That is an interaction between drugs and diseases. Had the red line not been present and drug 4 removed so only three drugs and 2 diseases, the green and blue lines are (approximately) parallel to each other, drugs 1 and 3 (approximately) do not interact with disease. The difference is the main effect of drug.

 

How much “non-parallel-ness” is allowed? That would be determined by the actual F-test for the interaction.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 250 views
  • 1 like
  • 3 in conversation