Hi all,
I have a question on creating a figure using linear mixed model results. The time variable is categorical, and the outcome is a score. My mentor asked me to draw one line in an unadjusted model and then draw one line while adjusting for several covariates. I can easily create the first figure using proc plm (figure 1). However, when I include covariates in the model and use proc plm, it automatically plots the figure and just adjust for effects with the variable after the "time" variable. Could someone assist me with this? Thank you!
unadjusted
PROC MIXED DATA = a METHOD = REML COVTEST;
CLASS record_id time(ref="6") younger gender education;
MODEL Score = time younger gender education/ SOLUTION OUTpred=PREDDATA;
RANDOM INTERCEPT / SUBJECT = record_id;
repeated time_ / type=ar(1) sub=record_id;
store out=MixedModel;
RUN;
proc plm restore=MixedModel;
effectplot interaction (x=time_);
run;
adjusted
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.