R-alpha: Re: R-beta: Bug or feature? [+ better histograms]
Peter Dalgaard BSA
p.dalgaard@kubism.ku.dk
18 Aug 1997 11:51:57 +0200
Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:
>
> >>>>> Ross Ihaka writes:
>
> > Bill Venables writes:
> >> First a bit of an explanation. Brian Ripley and I are firmly of
> >> the opinion that, to be any use in teaching at all, histograms
> >> should be nonparametric estimators of the probability density
> >> function. That is, the vertical scale should be a relative
> >> frequency density scale. It seems impossible to get this in R, so
> >> here is a function (+ a few extras) that does give you a "true"
> >> histogram, (unless you are peverse enough to request otherwise.)
>
> > Oh goody! I HATE the present hist; partly because of the
> > frequency/density aspect, but mainly because if I ask for 10 cells I
> > expect to get 10 cells, not 7 or 35 or whatever. I'd like propose
> > that the present hist get renamed hist.old (or something similar) and
> > that Bill's "truehist" become the true "hist".
>
> I'd say, get rid of the old one ...
>
Ugh. Please do NOT do that! Some of us need to teach histograms to
people who have difficulties with integrals (and also in recognizing
the connection between a barplot and a step function), so we have to
make do with "shape of curve" considerations, at least in the
beginning. The last thing we need is inexplicable y-axes.
The "# in bin" is not really problematic as long as the the bins are
of the same size and *much* easier to explain to students.
Even for a statistician, the number is really what conveys the
accuracy estimate that you need when you try to evaluate whether a
histogram matches a given density.
Make it an option, e.g. hist(x,as.density=T). People who can
understand why the "sum of area of blocks should be 1" can also figure
out how to add an option to a function call.
I could easily do without the "prettification" silliness, though.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-