BookmarkSubscribeRSS Feed
TamaraTavares
Calcite | Level 5

Hello,

 

I used proc mixed command to conduct linear mixed models to examine whether genetic status (mutation carrier vs. non-mutation carrier) is associated with increased ventricular volume (continous variable). I found a main effect of genetic status and another predictor variable (years to onset) and I am interested in plotting my data & the model in order to visualize it.  

 

I have ran the following to create a graph:


proc plm source=graph6;
title plot Genetic Status*Years From Symptom Onset; effectplot slicefit (x=YrsfromAV_AAO_Time1 sliceby=GS_Time1);
run;

 

I was wondering if anyone knows of a way to create this line graph that encompasses the model, in addition to a scatter plot indicating each data point overlaid on it.

 

Thank you in advance,

Tamara

1 REPLY 1
Rick_SAS
SAS Super FREQ

The "item store" that PROC PLM reads does not contain observation information, just a summary of the model. So you can't overlay the fit on a scatter plot with PROC PLM. However, you can use the OUTPUT statement to save out the predictions and then use PROC SGPLOT to visualize the model. See the example code in 

https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-plot-regression-line-from-mixed-mod...

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1676 views
  • 0 likes
  • 2 in conversation