Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Graph Mean SD of continuous variable over categorical variable


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Graph Mean SD of continuous variable over categorical variable
Date   Fri, 18 Jun 2004 18:01:29 +0100

No need to search. Just work it 
out step by step: 

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 

Nick 
[email protected] 

Syed O Masood
 
> I have to graph Mean +/- SD of a continuous variable
> over categorical variable. So far my search has not
> given me a graph option to plot a dot / bar graph of
> mean SD of a continuous varibale over categorical
> variable.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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