turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- plotting residuals in proc mixed for big dataset

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago - last edited 2 weeks ago by KurtBremser

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

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.