Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: histogram of tabular data


From   Phil Clayton <philclayton@internode.on.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: histogram of tabular data
Date   Tue, 30 Nov 2010 18:39:50 +1100

Sometimes I generate a "dummy" frequency variable equal to 1 in order to generate a frequency plot:

gen byte freq=1
graph bar (sum) freq, over(sex) over(classroom) asyvars

Phil

On 30/11/2010, at 9:36 AM, Hillel Alpert wrote:

> Could anyone advise if Stata can be used to generate a histogram showing multiple bars per category of the variable being plotted? Each bar would be the frequency or percentage of the variable for a subcategory of a second variable.
> 
> For example, the histogram would show the numbers of boys and girls in each of ten classrooms, where the bars for boys and girls of each classroom are adjacent to one another. 
> 
> Hillel
> 
> *
> *   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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index