BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kngu022
Obsidian | Level 7
ODS GRAPHICS ON;
PROC REG DATA=Gas PLOTS(UNPACK);
MODEL lnox = E E2 / CLB; OUTPUT OUT=resid R=resid P=pred;
WHERE Nox > 0.9; RUN; QUIT;
PROC LOESS DATA=resid; MODEL resid = pred / SMOOTH=0.8; RUN; ODS GRAPHICS OFF;Screen Shot 2020-01-27 at 1.24.49 PM.png

Hi everyone,

above it is the code for quadratic model. For Cook's Distance it still has some outlier which is above 0.2, 0,3 and 0.4. Could you tell me how can I remove these outlier please?

Thanks a lot.

1 ACCEPTED SOLUTION

Accepted Solutions
unison
Lapis Lazuli | Level 10

What about something along these lines:

*Output new_class where cookd<0.2;
proc reg data = sashelp.class;
  model height = age;
  output out = new_class(where=(cookd<0.2)) cookd = cookd;
run;
quit;

*check results of reg on new_class;
proc reg data = new_class;
  model height = age;
run;
quit;
-unison

View solution in original post

1 REPLY 1
unison
Lapis Lazuli | Level 10

What about something along these lines:

*Output new_class where cookd<0.2;
proc reg data = sashelp.class;
  model height = age;
  output out = new_class(where=(cookd<0.2)) cookd = cookd;
run;
quit;

*check results of reg on new_class;
proc reg data = new_class;
  model height = age;
run;
quit;
-unison

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1015 views
  • 3 likes
  • 2 in conversation