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