Statalist The Stata Listserver


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

st: RE: Further query on twoway bars for 2 rates


From   "Thuy Le" <tl6775a@american.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Further query on twoway bars for 2 rates
Date   Tue, 06 Jun 2006 21:34:37 -0400

Hi Dan,

What you can do is: 
graph twoway (bar rate1 groupvar,(barw(0.5))  (rcap lb1 ub1 groupvar),
saving(graph1, replace)
graph twoway (bar rate2 groupvar, barw(0.5))  (rcap lb2 ub2 groupvar),
saving(graph2, replace)
graph combine "graph1.gph" "graph2.gph", saving(graph1_2,replace)

You will have a side-by-side graph.

Thuy



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Daniel Exeter
Sent: Tuesday, June 06, 2006 6:20 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Further query on twoway bars for 2 rates

Hi folks, 

Thanks to those who replied yesterday. Perhaps my request wasn't clear. 

I want to map rates for males and females, with 95% CIs, by a group variable
(e.g. region). 

If I use the syntax
#d;
graph twoway (bar rate1 groupvar,(barw(0.5))  (rcap lb1 ub1 groupvar ) (bar
rate2 groupvar, barw(0.5))  (rcap lb2 ub2 groupvar), ; #d cr

I obtain a graph where the bars for males and females and their CI's are
plotted. However, the two bars are upon one another. 

Is there a way to somehow shift the rate2 bars and CIs to the right, so that
they have an appearance similar to the command

Graph bar (asis) rate1 rate2, over(groupvar) 

With the confidence intervals attached?

Cheers
Dan




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


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