BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NKormanik
Barite | Level 11

I'd like to cut off really long tails from a histogram.  There are a few outliers at either side.  Histogram shows everything bunched up in the very middle, as a result.

 

SAS instructions are sorta crazy.  A zillion options.  But I can't find the option for this need.

 

I'd like to ONLY histogram data between, say, 100 and 300.

 

I could create a new dataset, as needed.  But I'm hoping there is a more direct approach, by using some option on the histogram line, or in the univariate line.  Or maybe some other ingenious way?

 

Thanks!

 

Nicholas Kormanik

 

1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12

Easiest way out would be to add

 

where N between 100 and 300;

Hope this helps,

- Jan.

 

 

View solution in original post

4 REPLIES 4
jklaverstijn
Rhodochrosite | Level 12

Usually you can control the number and values of your midpoints. If you'd like to share your data and your current attempt and results we may be better able to help you.

 

Regards, Jan.

NKormanik
Barite | Level 11
proc univariate data=have;
var N;
histogram;
run;

Data range from 1 to 4000.  Mean=200.  Total rows=A million.

 

The early numbers are bogus, as are the high numbers.  I'd like to cut those off, and just see a histogram of the stuff in the middle.

 

Best would be to cut off via standard deviation, + or - one sd.

 

But it would be okay to use actual values, histogram values between 100 and 300.

 

 

jklaverstijn
Rhodochrosite | Level 12

Easiest way out would be to add

 

where N between 100 and 300;

Hope this helps,

- Jan.

 

 

NKormanik
Barite | Level 11

Thanks Jan!  Wow, was that easy, or what?!  Beautiful!

 

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
  • 4 replies
  • 2031 views
  • 0 likes
  • 2 in conversation