Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Xtgraph without error bars


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Xtgraph without error bars
Date   Tue, 15 Nov 2011 15:08:00 +0000

-xtgraph- is from SSC. 

You can plot geometric means directly without needing any add-ons:

sysuse auto
egen gmean = mean(log(mpg)), by(foreign)
replace gmean = exp(gmean)
scatter gmean foreign

There is no trick needed. If you don't want bars, don't plot them. 

Nick 
n.j.cox@durham.ac.uk 

N.M.Postel-Vinay@lse.ac.uk

I found a link from 2002 to a Statalist msg asking the same thing as I want to ask, where the anwser was that there was a bug with the add-on itself (http://stata.com/statalist/archive/2002-10/msg00629.html).

I'm trying to graph geometric means through time by group: - xtgraph ta, group(failure_type) av(gm) -
which works fine. But it always adds confidence intervals as a default, even when I add the option - bar(no)- (which is meant to be the right option).
Error bars often take a lot of space on the graphs and reduces visibility as well as "collapsing" a bit all the lines together.

If you have a solution it'd be great, I wonder if the bug within the xtgraph add-on has been corrected in any way, or if a "trick" has been found not to have the error bars.

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index