| Date: | Fri, 28 Jan 2011 08:58:56 -0500 |
| Reply-To: | "Feyerharm,Robert W" <RFEYERHA@TRAVELERS.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Feyerharm,Robert W" <RFEYERHA@TRAVELERS.COM> |
| Subject: | Re: histogram troubles |
|
| In-Reply-To: | <000601cbbef1$a731ddd0$f5959970$@mindspring.com> |
| Content-Type: | text/plain; charset=us-ascii |
A brilliant idea - the correct frequency %s are preserved, although there is a spike on the right hand side of the x-axis where all the values in excess of 100,000 are binned.
I'd like to use a histogram with a density plot overlay to compare the fit of various probability distributions with the data.
I thought about using R. Alas, in my current job in the private sector, my employer has imposed restrictions on which R packages we can download. Given R's advantages in the graphics dept, I think I can make a case for allowing access to the various graphing packages.
Robert
-----Original Message-----
From: Peter Flom [mailto:peterflomconsulting@mindspring.com]
Sent: Friday, January 28, 2011 8:46 AM
To: Feyerharm,Robert W; 'Sterling Paramore'; SAS-L@LISTSERV.UGA.EDU
Subject: RE: histogram troubles
Hi Robert
Nat just made the same suggestion I was about to; but you would then want to
relabel the x-axis and I am not sure this is possible in SAS (although it
may be).
It would be easy in R ....
Are you wedded to a histogram?
Peter
-----Original Message-----
From: Feyerharm,Robert W [mailto:RFEYERHA@travelers.com]
Sent: Friday, January 28, 2011 8:33 AM
To: 'Peter Flom'; 'Sterling Paramore'; 'SAS-L@LISTSERV.UGA.EDU'
Subject: RE: histogram troubles
Thank you for the suggestions.
Right, I thought about using the "where x<100000" statement to "crop" the
range of the x-axis in the histogram. But the problem here is that SAS
removes all observations where x>=100,000 and then recalculates the
frequencies of the histogram so that the % freq.'s of the bins sum up to
100%.
proc univariate data=test1;
where x < 100000;
var x;
histogram / endpoints=0 to 100000 by 1000; run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Peter
Flom
Sent: Thursday, January 27, 2011 6:36 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: histogram troubles
Sterling Paramore wrote
<<
Of course, this doesn't quite work if you're more interested in the
probability distribution than the absolute count.
>>
Indeed. What graph to choose depends on what you are looking for. There
isn't one "right" graph.
I'm not a big fan of histograms, I prefer density plots. Often with several
different smooths. Boxplots can be good too, if you are interested in the
probability distribution, as can quantile plots against various theoretical
distributions
Peter
===========================================================================
==
This communication, including attachments, is confidential, may be subject
to legal privileges, and is intended for the sole use of the addressee. Any
use, duplication, disclosure or dissemination of this communication, other
than by the addressee, is prohibited. If you have received this
communication in error, please notify the sender immediately and delete or
destroy this communication and all copies.
=============================================================================
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.
|