Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

re: st: easy histogram


From   David Airey <david.airey@Vanderbilt.Edu>
To   statalist@hsphsun2.harvard.edu
Subject   re: st: easy histogram
Date   Fri, 28 Feb 2003 17:34:17 -0600

I wrote:

I'm curious why there is an xscale(log) option in the easy histogram
dialog. When I do:

clear
sysuse auto
histogram mpg, saving(h1, replace)
histogram mpg, xscale(log) saving(h2, replace)
gen logmpg = log(mpg)
histogram logmpg, saving(h3, replace)
graph combine h1.gph h2.gph h3.gph

I get what I expect in the first and third histogram commands, but not
the second. The bars are stretched widthwise in the second histogram,
such that I don't think the density adds to 1. In some twoway commands,
changing the xscale to log when you have estimated a model on x and not
log(x) is an incorrect procedure. Is this another instance? If so, I
think it should be disallowed. Easy graph dialogs should be easy.

Stata replied:

It was probably not a good decision to include the xscale(log) and
yscale(log) options with "Easy Histogram". These options only adjust
the scaling of the axis and do not log the data. In retrospect, these
options do not belong on the "Axes" tab of "Easy Histogram" and
therefore they will be removed. Look for the change in the next
ado update.

I now write:

But does it _ever_ make sense to include this as an option for the histogram command? In twoway scatter it does, but in histogram it doesn't, since the area will not sum to 1. Am I wrong?

3 bugs for me.

-Dave

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index