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

st: bar graph of multiple variables


From   Richard Sherman <richard.sherman@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: bar graph of multiple variables
Date   Sun, 6 Mar 2005 19:57:39 +0100

Dear statalist,

Here is what must be a simple graphing problem; I confess that I am still mostly baffled by the Stata 8 graphics syntax.

I have seven variables, c1-c7, that take values 1, 2, or 3. I want a graph of the frequencies of these variables that looks something like this:


freq |
|
|
| *
| * *
| * *
| * * *
| * * * * * *
| * * * * * * * * *
|________________________________________ (... etc.)
1 2 3 1 2 3 1 2 3 (... etc.)

c1 c2 c3 (... etc.)


I have been slogging away with -graph bar- and have gotten no farther than the inelegant and unsatisfying method of generating three variables from each variable (measuring the count of each category) and using

graph bar (count) all-of-these-variables

or


graph bar (count) three-at-a-time
and then

graph combine these-seven-graphs

But surely there is a better way. Thanks in advance for any help.

-------------------------------------------------------------------
Richard Sherman
Department of Political Science, Leiden University
Leiden, Netherlands
http://homepage.mac.com/richard.sherman/

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