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]
st: AW: about graph bar
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: about graph bar
Date
Fri, 5 Mar 2010 18:36:50 +0100
<>
This is probably most easily accomplished via -by()-:
*************
sysuse auto, clear
graph bar (mean) weight, by(, note(" ")) by(foreign, total rows(1))
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von G. Dai
Gesendet: Freitag, 5. März 2010 17:42
An: [email protected]
Betreff: st: about graph bar
Dear all, here is my question. I have data on individual weight, gender, and
a dummy indicating
if the individual does exercises often. I want to compare if often exercise
is correlated with weight.
thus, I first
.graph bar weight,over(exercise)
and to compare the gender difference I also
.graph bar weight,over (exercise) over(gender)
As you can see I get two graphs one separating gender effect one not.
However, to save space,
I'd like to combine these tow graphs in one,that is one graph with three
type bars:male female and mixed.
thanks,
Guang
*
* 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/