Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Xtgraph without error bars

From   Nick Cox <>
To   "''" <>
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. 


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 (

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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index