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]

Re: st: dot chart with ci

From   David Crow <>
Subject   Re: st: dot chart with ci
Date   Thu, 9 May 2013 13:37:45 -0500

Dear Rick-

Have you tried ecl plot?  For this routine, you need a database with
four variables:  the value of your dots (y-axis), the lower and upper
bounds of your confidence intervals (mu-1.96*se, mu+1.96*se), where mu
is the value of your dots, and an id variable that gives a unique
identifier for each observation (x-axis).  This plot gives a number of
options for endcaps, appearances of the lines or bars for confidence
intervals, etc.

Here's some sample code:

input B cil ciu parmid
-.1556 -.217  -.094 1
-.058 -.090 -.025 2
.041 .001 .081 3
.139 .066 .212 4
eclplot B cil ciu parmid, ///
	rplottype(rspike) ///
	ciopts(lc(black)) ///
	estopts(col(black) msiz(small)) ///
	title("Effect of Income on Evaluations of Democracy" "at Different
Levels of Satisfaction with Democracy", col(black)) ///
	xtitle("Level of Satisfaction with Democracy") ///
	xlabel(1 "Not at All" 2 "Not Very" 3 "Somewhat" 4 "Very") ///
	xsca(titlegap(5)) ytitle("Coefficient for Effect of Income" "on
Evaluation of Democracy") ///
	yline(0, lw(medthick) lc(black))

I just saw that it looks like you had solved the problem otherwise,
but this is still a pretty useful command.  Hope it helps.


On Thu, May 9, 2013 at 6:31 AM, Richard Moverare
<> wrote:
> Dear Statalist,
> I would like to creat a dot chart with confidence intervals attached
> to the dots. I have variables for the estimates and their lower and
> upper bound. I have two estimates for each group of a group variable.
> So something like
> sysuse auto, clear
> graph dot (mean) length weight, over(rep78)
> But as mentioned I would like to add the confidence intervals. I guess
> I should use twoway scatter with rcap, but I don't get the result I
> want. Any help would be greatly appreciated.
> All the best,
> Rick
> *
> *   For searches and help try:
> *
> *
> *

Web site for México, las Américas y el Mundo:

David Crow
Profesor-Investigador/Assistant Professor
División de Estudios Internacionales
Carretera México-Toluca 3655
Col. Lomas de Santa Fe 01210  México, D.F.
Tel.:  5727-9800, ext. 2152
Fax:  5727-9872

Conmutador: 5727-98-00 Lada sin costo: 01 800 021 2433 (CIDE) |©

*   For searches and help try:

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