Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Scott Merryman <scott.merryman@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: graph bar, over() with overall mean |
Date | Thu, 30 Jan 2014 11:04:47 -0600 |
Yes, by creating an additional category: sysuse auto,clear set obs 76 replace rep = 6 in 75/76 replace fore = 0 in 75 replace fore = 1 in 76 sum mpg if fore == 1 & rep != 6 replace mpg = r(mean) if fore == 1 & rep == 6 sum mpg if fore ==0 & rep != 6 replace mpg = r(mean) if fore == 0 & rep == 6 graph bar (mean) mpg, over(rep78) over(foreign) asyvars legend(off) Scott * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/