BookmarkSubscribeRSS Feed
chavens
Fluorite | Level 6

Hi All,

 

I'm wondering how to create an interaction plot with a multivariable linear regression (using proc glm), but have so far come up empty. This is the code that I am using and I just want to create the interaction plot to be able to more easily interpret the interaction. I know that I could also stratify, but would prefer to visualize it this way first.

 

proc glm data=transpose_reg plots=(diagnostics residuals);
class lone;
by var_name;
model reg_var = lone age gender global lone*global / ss3;
means lone;
run;

 

Thanks,

 

chavens

1 REPLY 1
Rick_SAS
SAS Super FREQ

Use the STORE statement to save the model to an item store. Then use PROC PLM  and the EFFECTPLOT statement to slice and dice and create the interaction plot that you want. For an example, see the article "Use the EFFECTPLOT statement to visualize regression models in SAS."

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 4007 views
  • 0 likes
  • 2 in conversation