Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: adding mean and satndard deviation to histogram: stata 12
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: adding mean and satndard deviation to histogram: stata 12
Date
Wed, 27 Nov 2013 21:18:39 -0500
sysuse nlsw88, clear
summarize wage
local m=r(mean)
local sd=r(sd)
local low = `m'-`sd'
local high=`m'+`sd'
twoway histogram wage , ///
fc(none) lc(green) xline(`m') ///
xline(`low', lc(blue)) xline(`high', lc(blue)) scale(0.5) ///
text(0.12 `m' `"mean = $`=string(`m',"%6.2f")'"', ///
color(red) orientation(vertical) placement(2))
On Wed, Nov 27, 2013 at 5:46 PM, Fatma M Romeh <[email protected]> wrote:
> Dear Statalist,
>
> I need a help on how to show the mean and standard deviation on my histogram. I have looked at FAQ and tried their method, but it did not work out with me. I'm referring to this: http://www.stata.com/statalist/archive/2005-05/msg00673.html
>
>
> Thank you so much in advance,
>
> Fatma
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/