Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: histogram height as avg of another variable


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: histogram height as avg of another variable
Date   Wed, 13 Feb 2008 16:53:57 -0000

Also 

. search binsm 

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

Maarten buis

Have a look at -graph bar-. If the variable along x is continuous you
can create your own grouped variable, and use that in the -over- option
in -graph bar-.

Prashant Loyalka 

> I would like to create histogram(-type) graphs where the baseline
> axis is
> one variable (say x) and the height of each bin is an average of
> another
> variable (say y). The average of the y variable is based on the
> observation
> points within the bin as decided by a set binwidth along x. I would
> also like
> to be able to adjust the bindwidth size (a constant bindwidth size,
> i.e.) and the starting point of the bins along the x axis--also so
> that each bin can be centered around the midpoint of the binwidth.
> 
> Does Stata have this capability? If so, under what commands?
> 
> If not, could someone offer some guidance about how to program this?

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