BookmarkSubscribeRSS Feed
coverup
Calcite | Level 5

Hello,

My colleague has performed an APIM analysis in proc mixed, and obtained a significant three-way interaction. The outcome variable is continuous (satisfaction). Two predictors are continuous (perceptions and drinking) and one predictor is dichotomous (gender).

I would like to graph this 3-way interaction (perception*drinking*gender). Preferrably, I would like two windows, one displaying the 2-way interaction (perceptions and drinking) for males and one window for females.

Do anyone have any tips to help me graph this interaction?

Thank you!

4 REPLIES 4
Bill
Quartz | Level 8

proc gplot;

by gender; *for 2 graphs;

plot perception*drinking;

run;

plot perception*drinking=gender; *both on one graph;

run;

coverup
Calcite | Level 5

Hi Bill,

Thanks so much. However, those plots do not model the outcome variable (satisfaction). They just give a scatterplot of the data of two variables (by the third variable, gender). The interaction plot should give  us two lines that intercept each other. The plots outputted by the code would only give us one line (the relationship between perception and drinking).

Bill
Quartz | Level 8

Could you post a number of records for me to play with?

Ksharp
Super User

Maybe you need this:

symbol i=j v=none r=200;

proc gplot;

by gender;

plot perception*drinking=idno;

run;

idno is number of patient.

r= is repeat 200 times which is 200 patients.

i.e. How many patients you have ,how many repeated times(200)

Ksharp

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 4217 views
  • 0 likes
  • 3 in conversation