DATA Step, Macro, Functions and more

Outliers treatment methods

Reply
Contributor
Posts: 52

Outliers treatment methods

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,

Super User
Posts: 11,343

Re: Outliers treatment methods

Posted in reply to dkanand86

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.

Super User
Posts: 10,018

Re: Outliers treatment methods

Posted in reply to dkanand86
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  
Super User
Posts: 10,018

Re: Outliers treatment methods

Posted in reply to dkanand86
Here can give you outliers:


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


SAS Super FREQ
Posts: 3,752

Re: Outliers treatment methods

Posted in reply to dkanand86

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

Super User
Posts: 10,018

Re: Outliers treatment methods

Posted in reply to dkanand86
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 .
Ask a Question
Discussion stats
  • 5 replies
  • 337 views
  • 0 likes
  • 4 in conversation