Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: histogram, read axes


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: histogram, read axes
Date   Mon, 8 Dec 2008 18:05:51 -0000

What Stata does graphically with -histogram- can be replicated
numerically using the -twoway__histogram_gen- command. This was written
up in 

SJ-5-2  gr0014  . . . . . . . Stata tip 20: Generating histogram bin
variables
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . D. A.
Harrison
        Q2/05   SJ 5(2):280--281                                 (no
commands)
        tip illustrating the use of twoway__histogram_gen for
        creation of complex histograms and other graphs or tables

which is accessible to all under the Stata Journal's 3 year window. 

Example: 

sysuse auto 
twoway__histogram_gen mpg, width(2) start(10) gen(freq centre) freq
l freq centre if centre < .

Nick 
n.j.cox@durham.ac.uk 

Richard Boylan

I was wondering if there are any easy way to read the histogram that
state created.

Specially, I would to know exactly what bins were created and how many
observations are in each bin.

After drawing the histogram, I thought I would be able to see this
information using some "return" type of command,
but clearly that does not seem to be the case. I looked at the manual
but did not see any such commands either.

I looked at the STATA listserv and I was surprised to see that this
issue has not arisen before.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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