Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Graph Mean SD of continuous variable over categorical variable - but with a twist


From   Lars Folkestad <lfolkestad@health.sdu.dk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Graph Mean SD of continuous variable over categorical variable - but with a twist
Date   Tue, 25 Oct 2011 09:02:27 +0200

Dear List

I am trying to depict the differences in mean±SD of two continuous

Variables ovar a categorical variable – i have googled the stata-

List history and found this methode:

egen mean = mean(cont), by(cat)
egen sd = sd(cont), by(cat)

gen upper = mean + sd
gen lower = mean – sd


scatter mean cat || rcap upper lower cat

or even

serrbar mean sd cat


But this does not give me the option to change the colour of the

Mean (dot) or the SD (bars) for each group, witch visually would

Be preferable.


Does anyone know how to do this?

Thank you

Lars

*
*   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   |   Site index