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

st: RE: RE: RE: histogram


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: histogram
Date   Tue, 20 Jul 2004 15:41:37 +0100

This is a more positive idea than mine, which may be 
sufficient for was wanted. 

Note, however, an implication. It is not that -histogram- 
shows bars of zero height when bins are empty; rather, it shows
no bars at all when they would be of zero height if they were
contemplated at all. It follows, I think, that cloning -histogram- 
would be more difficult than I hinted, and some genetic 
engineering would be needed besides. 

Nick 
[email protected] 

David Harrison
> 
> If you have no zero bins in your histogram then no new 
> programming is required, just use -twoway histogram- with the 
> -recast(line)- option. As Nick rightly highlights though, 
> this will not deal correctly with zero bins.

Nick Cox 
> 
> I suspect that you want what is often called
> a frequency polygon. Frequency polygons 
> are not supported by official Stata. There 
> are various user-written programs in 
> existence, although none I think in the public 
> domain. One user got excited by the problem
> a while back, but (s)he doesn't seem to have 
> followed through to completion. 
> 
> Programming them from scratch divides into 
> the easy bit, which is easy, and the difficult 
> bit (making sure that zero bins are shown properly), 
> which is not so easy. I guess that a good Stata 
> programmer could also look at -histogram- 
> and clone it, but that would be a class act. 
> 
> An alternative, which I believe superior, is 
> to go straight to -kdensity-. Statistical 
> science spent too many decades stuck 
> in bins. Climb out of the bins and get 
> smoother estimates! 
 
D.Christodoulou

> > This is probably a silly question:  
> > How do I get a density line in the -hist- graph command 
> > without the visual of the bins, i.e. to 
> > connect the pinnacles of each bin, and get rid off the bins ?
> > 
> > I search the graph manual but I couldn't find it, is it there 
> > somewhere?

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