BookmarkSubscribeRSS Feed
dkanand86
Calcite | Level 5

Hi Everyone,

 

I have two tasks for each variable in my dataset:

 

1. Find outliers for each variable

2. Treat the outliers for each variable

 

 

Let me know your comments.

 

Regards,

5 REPLIES 5
ballardw
Super User

Define outlier. There is no actual standard definition, so you'll have to have some rule for that.

 

proc univariate may get you started with some ideas.

 

And what do you mean by "treat" the outliers? There are many approaches some can be pretty complex, others are as simple as set the value to missing or remove the observation from the dataset.

Ksharp
Super User
Yeah.There are many way you can define outliers:

1) [mean-2*std , mean+2*std]  out of this range is outliers.
2) [Q1- 1.5*(Q3-Q1)  ,  Q3 + 1.5*(Q3-Q1)]  out of this range is outliers.
3) Check   proc robustreg  
Ksharp
Super User
Here can give you outliers:


proc robustreg data=sashelp.cars method=MM ;
model invoice = /diagnostics;
run;


Rick_SAS
SAS Super FREQ

For a discussion of detecting univariate outliers, you might want to read Detecting outliers in SAS   It explains some of KSharp's suggestions.

Ksharp
Super User
Oh. Don't format the IML function like : LTS() , LTM()..... Rick's blog has already explained it . And Better check the documentation of IML, There is a special chapter to talk about it .

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3270 views
  • 0 likes
  • 4 in conversation