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

Re: st: easy histogram


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st: easy histogram
Date   Fri, 28 Feb 2003 18:25:54 -0600

David Airey <[email protected]> asks about the -xscale(log)- option
with easy graphs:

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

After receiving a reply from an email he sent to Stata's Technical Support,
David then asks:

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

David makes a good point for removing the option for -histogram-, and we will
remove the checkboxes for log scales from the easy graph dialog for
-histogram-.

However, the "full featured" dialog for -histogram- will remain the same since
both -xscale(log)- and -yscale(log)- are valid -graph twoway- options.

--Jeff
[email protected]
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index