From p.dalgaard@kubism.ku.dk  Mon Aug 18 10:51:57 1997
From: p.dalgaard@kubism.ku.dk (Peter Dalgaard BSA)
Date: 18 Aug 1997 11:51:57 +0200
Subject: R-alpha: Re: R-beta: Bug or feature?  [+ better histograms]
In-Reply-To: Kurt Hornik's message of Mon, 18 Aug 1997 11:00:25 +0200
References: <199708170921.VAA03388@stat1.stat.auckland.ac.nz>
 <9708172313.AA15474@attunga.stats.adelaide.edu.au>
 <199708172342.LAA09442@stat1.stat.auckland.ac.nz>
 <199708180900.LAA02371@aragorn.ci.tuwien.ac.at>
Message-ID: <x23eo7ddj6.fsf@bush.kubism.ku.dk>

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: Re: R-beta: Bug or feature? [+ better histograms]
Peter Dalgaard BSA