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

st: RE: AW: graphing means with std dev

From   "Nick Cox" <>
To   <>
Subject   st: RE: AW: graphing means with std dev
Date   Tue, 26 May 2009 13:16:05 +0100

Also check out the official command -serrbar-. It expects means and SDs to exist already, so the -collapse- route is pertinent. 

You could show more of the data too. Why stop at means and SDs? Check out -dotplot- (official), -stripplot- (SSC). 


Martin Weiss

sysuse auto, clear
collapse (mean) meanprice= price /// 
(sd) sdprice=price, by(rep78)
gen lb=mean-sd
gen ub=mean+sd
twoway (rcap lb ub rep78) /// 
(scatter meanprice rep78)

Michael Eisenberg
I would like to generate a graph that plots the mean age with whiskers
representing the standard deviation for each level of a categorical

For example:
category 1:  70+-2.0
category 2:  71+-3.5
category 3:  72+-4.5
category 4:  73+-2.5
category 5:  74+-1.5

Ideally, I'd like a scatter plot like appearance so that each category
has a point (the mean) with whiskers (std dev).

Is this possible is Stata?

*   For searches and help try:

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