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: AW: RE: -ciplot- -eclplot- combine with box-options?
From
"Kaulisch, Marc" <[email protected]>
To
<[email protected]>
Subject
st: AW: AW: RE: -ciplot- -eclplot- combine with box-options?
Date
Fri, 7 May 2010 19:13:03 +0200
Okay, it seems that -statsby- does the trick together with -dsconcat- (ssc).
Preliminary without labels etc:
sysuse bpwide
tempfile tf1 tf2
statsby mean1=r(mean) ub1=r(ub) lb1=r(lb) N1=r(N), by(agegrp) saving(`tf1') subsets total: ci bp_before
statsby mean2=r(mean) ub2=r(ub) lb2=r(lb) N2=r(N), by(agegrp) saving(`tf2') subsets total: ci bp_after
dsconcat `tf1' `tf2'
twoway rcap ub1 lb1 agegrp || scatter mean1 agegrp || rcap ub2 lb2 agegrp || scatter mean2 agegrp
Marc
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Kaulisch, Marc
Gesendet: Freitag, 7. Mai 2010 16:43
An: [email protected]
Betreff: st: AW: RE: -ciplot- -eclplot- combine with box-options?
Nick,
Thanks a lot for this extensive answer. I learn a lot. I haven't had time yet to go deeper in the opportunities to work with statsby (will do this later). But experimenting with -stripplot- I come very early to an end...
I would like to create a graph such as
. sysuse bpwide
. graph hbox bp_before bp_after, over(sex) over(agegrp), sort(1)
descending)
But I do not want a boxplot but a ci-bar as in stripplot...
-stripplot- does not allow two vars with over.
. ciplot bp_before bp_after, by(agegrp)
looks closer to my interest...
Marc
*
* 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/