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

st: easy histogram


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

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.

-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