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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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