- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am comparing the effects of four treatments, x1,x2,x3,x4 on an outcome, y. I am using proc GLM to run this analysis. I need to calculate the standardized residuals for the model, how can I do that?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What's your definition of standardized residual?
SAS calculates a studentized residual as residual/ stderr, which appears the same by some definitions:
http://www.r-tutor.com/elementary-statistics/simple-linear-regression/standardized-residual
You can get that using the OUTPUT statement, STUDENT option.
@sasnewbie12 wrote:
I am comparing the effects of four treatments, x1,x2,x3,x4 on an outcome, y. I am using proc GLM to run this analysis. I need to calculate the standardized residuals for the model, how can I do that?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I used the OUTPUT statement and STUDENT option, but I'm not sure how to print the standardized residuals. Here is my code:
proc reg data=work.'chp 14 # 50'n;
model y=x
output residual=yresid
predicted=yhat
student=stdres;
run;
Thank you!
-Travis
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You could use the R option in the MODEL statement. Or:
you should probably give the output data set a name
output OUT=RESIDUALS residual=yresid predicted=yhat student=stdres;
Then you could use PROC PRINT or VIEWTABLE or many other procedures to see the residuals.
A side question ... why would you want to PRINT residuals or standardized residuals? I see no benefit there ... rather your ought to be PLOTTING residuals, and there are many ways to do that.
Paige Miller