hi there
I am trying to plot rresiduals in proc mixed for fixed and random effect for a big data but I do not know how.
Can anybody give me some example and different was for plooting residuals in proc mixed please?
regards,
Farg
To get residuals in PROC MIXED for a large data set, you need to add the RESIDUAL option to the model statement. This requests plots of both conditional and marginal residuals. However, ODS supresses plots with more than 5000 points by default. To remove this restriction, add plot(maxpoints=none) to the PROC MIXED statement. Here's an example:
proc mixed data=mydata plots(maxpoints=none);
class id;
model y = x / ddfm=kr2 residual;
random int / subject=id;
run;
On a side note, I recommend that you also plot the predicted values for the random effects (the EBLUPS). Like the residuals, the random effects are assumed to be normally distributed and unrelated to the predictors. You can request EBLUPS with the SOLUTION option on the RANDOM statement, and then output them with an ODS OUTPUT statement. Here's an example:
proc mixed data=mydata plots(maxpoints=none);
class id;
model y = x / ddfm=kr2 residual;
random int / subject=id solution;
ods output solutionr=randomeffects;
run;
The data set of EBLUPS can then be combined with your original data for graphing.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.