Statalist


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

st: AW: graphing means with std dev


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: graphing means with std dev
Date   Tue, 26 May 2009 08:59:46 +0200

<> 


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



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael Eisenberg
Gesendet: Dienstag, 26. Mai 2009 08:45
An: statalist@hsphsun2.harvard.edu
Betreff: st: graphing means with std dev

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

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?

Thank you.

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


*
*   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   |   What's new   |   Site index