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

Leaf Sun leaflovesun at yahoo.ca
Thu Nov 3 18:21:22 CET 2005


 Thanks for all the response. I think plotting a cdf or taking transformation could make the plot look better.

 But my further question is how to set the breaks to make the histogram concentrate in the interval of (0.01,0.2). I can even ignore the other parts of the values. 

Thanks!

Leaf



======= At 2005-11-02, 12:07:12 you wrote: =======

>> > Leaf Sun wrote:
>> > 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).
>
>I guess the histogram is as you wrote. See
>http://web.maths.unsw.edu.au/~tduong/seminars/intro2kde/
>for a short explanation.
>
>
>> -----Original Message-----
>> From: Berton Gunter [mailto:gunter.berton at gene.com]
>> Sent: Wednesday, November 02, 2005 1:10 PM
>> To: 'Leaf Sun'; r-help at stat.math.ethz.ch
>> Subject: [R] Visualizing a Data Distribution -- Was: breaks in hist()
>>
>>
>> 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
>> >
>> >
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>

= = = = = = = = = = = = = = = = = = = =




More information about the R-help mailing list