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
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.