- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-17-2022 08:55 PM
(2526 views)
I was wondering if there is a way to get Cook's Distance values on the REG Procedure output statistics table when doing regression? Or a way to get the Cook's D values tabulated.
Thank you!
Joanna
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
An ODS OUTPUT statement can direct the data used for plots into a data set.
Generic syntax is Ods output plotname=yourdatasetname;
Possible plot names from Proc reg are CooksDChart CooksDPlot StudResCooksDChart (studentized residuals) depending on requested plots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Read about two ways to obtain the Cook's D statistics for each observation in a regression model by using PROC REG:
1. On the OUTPUT statement, use the COOKD= option
2. Create the Cook's D plot (PLOTS=(CooksD)) and use ODS output to write the data to a data set:
ods output CooksDPlot=CookOut;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you pay some time to flip the doc of PROC REG, you would find the answer. proc reg data=sashelp.class; model weight=height / influence; output out=want cookd=cookd; quit;