[R] Visualizing a Data Distribution -- Was: breaks in hist()

Berton Gunter gunter.berton at gene.com
Wed Nov 2 19:09:47 CET 2005


Leaf:

An interesting question concerning graphical perception. As you have noted,
choice of bin boundaries in a histogram can have a big effect on how a
distribution is perceived. My $.02 (U.S.):

Histograms are a relic of manual data plotting. We have much better
alternatives these days that should be used instead. e.g.

1. (my preference, but properly not consumer-friendly). Plot the cdf instead
(?ecdf) .

2. Plot a density estimator (?density ; ?densityplot)

3. See David Scott's ash package, perhaps the KernSmooth package also
(though density() probably already has anything that you'd need from it). 

Cheers,

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Leaf Sun
> Sent: Wednesday, November 02, 2005 9:49 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] breaks in hist()
> 
> Dear listers,
> 
> A quick question about breaks in hist().
> 
> The histogram is highly screwed to the right, say, the range 
> of the vector is [0, 2], but 95% of the value is squeezed in 
> the interval (0.01, 0.2). My question is : how to set the 
> breaks then make the histogram look even?
> 
> Thanks in advance,
> 
> Leaf
> 
>




More information about the R-help mailing list