BookmarkSubscribeRSS Feed
sasphd
Lapis Lazuli | Level 10

I want simply delete outliers 0.5% at each tail. How I can do that???

5 REPLIES 5
art297
Opal | Level 21

Take a look at the ideas (and solutions) presented in this thread: https://communities.sas.com/t5/SAS-Statistical-Procedures/How-to-remove-OUTLIERS-in-Base-SAS/td-p/90...

 

HTH,

Art, CEO, AnalystFinder.com

 

sasphd
Lapis Lazuli | Level 10

I did not suceed to do it Can you give me a sample

mkeintz
PROC Star

What did you do?  What did you expect it to do?  What did you get?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
art297
Opal | Level 21

Here is an example:

 

data have;
  input Cost;
  cards;
11326.210369
12486.48938
12461.600695
17078.181683
20830.827535
21301.654723
19246.458983
17233.110851
20086.991101
18998.225999
18755.580299
18363.870699
18084.353599
22674.720499
16680.130049
15838.031999
19773.713649
16864.323849
17499.784599
16918.186999
18383.525249
20307.965549
18135.335899
16504.779198
22346.398306
18484.330644
18335.447644
19685.665094
19591.907594
18702.066744
18938.583444
17878.801744
23398.002544
18101.282344
18554.513094
18812.566344
21834.429194
19587.505132
16619.15172
;

proc rank data=have out=ranks (drop=cost)  groups=100;
  var cost;
  ranks cost_rank;
run;

data want;
  set have;
  set ranks;
  if 6 <= cost_rank <= 95;
run;

HTH,

Art, CEO, AnalystFinder.com

 

atzamis
Obsidian | Level 7

Hi,

 

try this

 

proc rank data=have out=ranks(where=(6 <= cost_rank <= 95 ))   groups=100;
  var cost;
  ranks cost_rank;
run;

 

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 2162 views
  • 1 like
  • 4 in conversation