Statalist


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

st: AW: graphing means with std dev


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
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: [email protected] [mailto:[email protected]] Im Auftrag von Michael Eisenberg
Gesendet: Dienstag, 26. Mai 2009 08:45
An: [email protected]
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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index