Statalist


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

Re: Re: st: tabulate and graph bar


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: Re: st: tabulate and graph bar
Date   Tue, 27 May 2008 15:10:08 +0100

This may look like the obvious answer, but I don't think it is what is best here.

I guess P�l wants to see bar graphs of category frequencies or percents for one-, two- or three-way tables.

You can get useful results with a trick

gen frequency = 1
graph bar (sum) frequency, over(frog) over(toad)

once we recall that counting is adding 1s as many times as is needed.

But it is a small pain to extend this even to simple percent calculations. So, as a convenience, there are various user-written programs, of which -catplot-, -tabplot- and -spineplot- spring to mind.

-search- using these program names for program locations and documentation, including various pieces in the Stata Journal from 2004 and 2008.

Nick
[email protected]

Maarten Buis

--- P�l R�nning <[email protected]> wrote:
> What is the easiest way of creating bar graphs of categorical data
> containing several categories? Sofar I havent found an option to
> graph after a tab command-does one exist?

-help graph bar-

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