I am trying to plot a histogram of some data in proc univariate. The data values range from 1 to 1,500,000, but most of them are less than 100,000. I want to only look at the range from 1 to 100,000 so my graphs are readable.
Using a where statement won't do, because I would like the end bin of the histogram to peak to represent those that have been truncated.
The MIDPOINTS = option doesn't work...I get the following error:
WARNING: The MIDPOINTS= list was extended to accommodate the data.
Any suggestions? Can this automatic "fix" for the MIDPOINTS option be overwritten?
/* The variable ranges from 1 to 1,592,250, with most values less than 100,000 */
proc univariate noprint data = analysis_AE;
histogram analysis_var / midpoints = 0 to 25000 by 5000;
Specifying individual midpoints doesn't work either, I get the same error. However the goal is to write a macro for this so eventually that would not work (different variables input would have different ranges, etc.), but I just want it to work on a hard coded level first.
Thanks a lot for your interest and any further help!
Honestly, you may want to share code that gets a "hard" SAS error, where you have coded explicit MIDPOINTS= values showing how you cannot code a low to high set of values, with intermediate midpoint values more frequent at the lower range. The DOC appears to contradict what you indicate is your experience.
Nevermind I just realized that I can code records beyond my bounds as equal to the bounds, creating the effect that I want. Any computed stats from univariate won't be correct, but I don't want any here so that's great.
Thanks for trying to help me, sorry to waste your time.