Statalist


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

Re: st: histogram height as avg of another variable


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: histogram height as avg of another variable
Date   Wed, 13 Feb 2008 08:45:49 +0000 (GMT)

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

Hope this helps,
Maarten

--- Prashant Loyalka <presearchwork@gmail.com> wrote:

> Hi,
> 
> 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?
> 
> Thank you!
> *
> *   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/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/
*
*   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