Herve,
You can list the number of observations in a footnote.
. count if post_ifrs == 0
. local pi0 = r(N)
. count if post_ifrs == 1
. local pi1 = r(N)
. histogram ib_scaled_w if ib_scaled_w >-.1 & ib_scaled_w<.1 &
country=="AUS" & sample_sum==1, bin(20) by(post_ifrs, note("post_ifrs
= 0: `pi0' observations, post_ifrs = 1: `pi1' observations"))
title("AUS") saving (hist_AUS, replace)
Friedrich
On Thu, Apr 10, 2008 at 1:17 PM, Herve STOLOWY <[email protected]> wrote:
> Dear Statalisters:
>
> I am starting to use graphs. So, I hope that you will forgive my probably basic question.
>
> I run the following command:
>
> histogram ib_scaled_w if ib_scaled_w >-.1 & ib_scaled_w<.1 & country=="AUS" & sample_sum==1, bin(20) by(post_ifrs) title("AUS") saving (hist_AUS, replace)
>
> post_ifrs is a binary variable (coded 0 or 1).
>
> Is there a way to display the total number of observations corresponding to each of the histograms obtained with the command? (one graph with post_ifrs = 0 and one graph with post_ifrs=1)
>
> I searched in the Graphics Stata manual but did not find the solution.
>
> Best regards
>
> Herve Stolowy
>
> ***********************************************************
> Professeur/Professor
> President of the French Accounting Association (AFC)
> HEC Paris
> Departement Comptabilite Controle de gestion / Dept of Accounting and Management Control
> 1, rue de la Liberation
> 78351 - Jouy-en-Josas
> France
> Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
> mail: stolowy at hec dot fr
> web: http://www.hec.fr/stolowy
*
* 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/