Bookmark and Share

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: Re: st: RE: Adding a text to a histogram


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: Re: st: RE: Adding a text to a histogram
Date   Sun, 26 May 2013 18:34:33 +0100

The number of observations is returned as r(N) by -summarize-.
Nick
[email protected]


On 26 May 2013 15:08, menteith <[email protected]> wrote:
> Thanks! Now everything is ok.
> I would have some questions, thought.
> Does  the  histogram  look  clear?
> How  to  calculate  number of
> observations (N)? I have not managed to add them the way I was able to
> when it comes to the mean and st dev (ie. "SD. = `=string(`=r(sd)',"%8,2f").
> Any other comments would be of great importance.
>
> Screenshot:
> http://i.imgur.com/ziHQ0uh.png
> My commands are:
>
> quiet: summarize longevity
> histogram  longevity,  bin(10)  frequency  fcolor(gs10)  lcolor(white)
> \\
> normal    normopts(lcolor(black))     xtitle(,   height(5))   ytitle(,
> \\
> height(5))   ytitle(Frequency)    ylabel(,   glcolor(gs13))   ylabel(,
> \\
> angle(horizontal)) xlabel(#5, format(%9.0g)) graphregion(color(white))
> \\
> bgcolor(white)  text(5.7  9  "mean  =  `=string(`=r(mean)',"%8,2f")'",
> \\
> placement(center))  text(5.3 8.55 "SD. = `=string(`=r(sd)',"%8,2f")'", placement(center)) text(4.95 9.25 "N = 19")
>
>
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index