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

st: RE: Graph


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Graph
Date   Mon, 8 Dec 2003 11:14:03 -0000

There is some related discussion at
(mailer may split URL)
http://www.hsph.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalis
t.0302/Author/article-604.html

Using no more than official Stata, you need
something like

. gen freq = 1
. graph bar (sum) freq, over(myvar) stack asyvars

If you download -catplot- from SSC, you don't
need to create a new variable. You can get
this in one once you have installed by

. ssc inst catplot

with

. catplot bar myvar, stack asyvars

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

Finne Håkon

> In Stata 8, what is the -graph bar- equivalent of -graph
> pie , over(myvar)-
> ? That is, I want a single stacked bar showing the distribution over
> categories for myvar.

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