Hello all,
I want to put the leverage and outlier observations that are detected via robust regression, in a separate dataset. Any help will be appreciated to solve my problem.
In your recent thread Detect extreme values through leverage and outlier changing cutoff value based on 90 percentiles you were recommended to read @Rick_SAS's blog post Detecting outliers in SAS: Part 3: Multivariate location and scatter.
Take another look at the post. It has an example that does bulk of what you request. The statement
ods output diagnostics=Diagnostics(where=(leverage=1));
produced a data set named diagnostics with 4 observations at leverage=1.
Instead you could drop the "where=(leverage=1)" options, which would produce as many obs in diagnostics as in your original data, and in the same order.
You could then do this:
data want;
merge your_original_dataset diagnostics;
if leverage=1;
run;
Or you could use whatever minimum leverage values you prefer.
In your recent thread Detect extreme values through leverage and outlier changing cutoff value based on 90 percentiles you were recommended to read @Rick_SAS's blog post Detecting outliers in SAS: Part 3: Multivariate location and scatter.
Take another look at the post. It has an example that does bulk of what you request. The statement
ods output diagnostics=Diagnostics(where=(leverage=1));
produced a data set named diagnostics with 4 observations at leverage=1.
Instead you could drop the "where=(leverage=1)" options, which would produce as many obs in diagnostics as in your original data, and in the same order.
You could then do this:
data want;
merge your_original_dataset diagnostics;
if leverage=1;
run;
Or you could use whatever minimum leverage values you prefer.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.