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
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.
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;
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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.