I've run a mixed model and want to plot the Actual by. Predicted values. In JMP you can plot the predicted values or the Conditional predicted values (the values with Random Effects included) as the x-var. I see that in Proc Mixed you have the option of saving the predicted values as OUTPRED=filename but is this using the Predicted or Conditional Predicted values? Then, how do I graph them? Thanks.
Or, is it better to use Proc PLM?
proc mixed data=source;
class hyb ntrt;
model y = a b a*b / redidual outpred=predicted;
random hyb ntrt hyb*ntrt ;
lsmeans a b / pdiff=all cl adjust=tukey alpha=0.10;
title 'Model A';
store ModA;
run;
proc plm restore=ModA;
effectplot;
run;
See the examples and discussion in "Visualize a mixed model that has repeated measures or random coefficients"
Briefly:
See the examples and discussion in "Visualize a mixed model that has repeated measures or random coefficients"
Briefly:
Thanks for your help with this. This is what I ended up adding:
proc mixed data=source;
class hyb ntrt;
model tnc = a b a*b / residual outpred=predicted;
random hyb ntrt hyb*ntrt ;
lsmeans a b / pdiff=all cl adjust=tukey alpha=0.10;
title 'Model A';
store ModA;
run;
proc sgplot data=predicted;
title "Predicted vs Actual Graph";
scatter x=Pred y=tnc;
lineparm x=0 y=0 slope=1; /** intercept, slope **/
xaxis grid; yaxis grid;
run;
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 16. Read more here about why you should contribute and what is in it for you!
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.