03-15-2017 04:29 PM
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);
model reg_var = lone age gender global lone*global / ss3;
03-15-2017 07:43 PM
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."