# =?UTF-8?Q?R=C3=A9p.=20:=20Re:=20st:=20-estout-=20and=20percentag?==?UTF-8?Q?e=20of=20"correctly=20classified"=20after=20-logit-?=

 From "Herve STOLOWY" To Subject =?UTF-8?Q?R=C3=A9p.=20:=20Re:=20st:=20-estout-=20and=20percentag?==?UTF-8?Q?e=20of=20"correctly=20classified"=20after=20-logit-?= Date Tue, 17 Jun 2008 19:38:12 +0200

```Dear Ben:

Thanks, once again, for your help.

I tried both solutions.

Solution 1:

Solution 2 :

Best regards

Herve

***********************************************************
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
>>> "Ben Jann" <ben.jann@gmail.com> 17/06/08 18:37 >>>
Herve, the results from -estat class- are not stored with -estimates
store-. You have to call -estadd- right after -estat class-.

logit  ...
estat class
estimates store m1

logit  ...
estat class
estimates store m2

...

Alternatively, write a wrapper for -estat class-

estat class
ereturn scalar p_corr = r(P_corr)
end

ben

On Tue, Jun 17, 2008 at 4:07 PM, Herve STOLOWY <stolowy@hec.fr> wrote:
> Dear Statalisters:
>
> I use -estout- (downloadable from ssc) after three logit regressions. I would like to add in my summary statistics the percentage of correct classification of the models. This percentage is obtained after -estat class- and corresponds to the r(P_corr) of the return list.
>
> I provide below my syntax. I have the following problem: the figure displayed in the output for this percentage is the same for the three models and equals the correct percentage of the last model. I am obviously wrong somewhere.
>
> Thank you for your help.
>
> Best regards
>
> Herve Stolowy
>
> xi: logit ar_english size2 int_sales listing concent roa_if_cumul_w  growth_op3 leverage_if tongue_importance3_bis_sqrt ln_mktcap_wb if year==2003 & leverage_if<1.5 & growth_op3<7, robust
>
> estat class
> estimates store m1, title(Model 1: Basic model - 2003)
>
> xi: logit ar_english size2 listing roa_if_cumul_w  growth_op3 leverage_if tongue_importance3_bis_sqrt ln_mktcap_wb if year==2003 & leverage_if<1.5 & growth_op3<7, robust
>
> estat class
> estimates store m2, title(Model 2: Expanded model - 2003)
>
> xi: logit  ar_english size2 int_sales listing concent roa_if_cumul_w  growth_op3 leverage_if  tongue_importance3_bis_sqrt ln_mktcap_wb i.new_sic3 if year==2003 & leverage_if<1.5 &  growth_op3<7, robust
>
> estat class
> estimates store m3, title(Model 3: Basic model with industries - 2003)
>
> estadd nagelkerke: m1 m2 m3
> estadd scalar p_corr = r(P_corr): m1 m2 m3
> estadd scalar cons = _b[_cons]: m1 m2 m3
> estadd scalar cons_t = _b[_cons]/_se[_cons]: m1 m2 m3
> estadd scalar cons_p = (1-normal(abs(_b[_cons]/_se[_cons]))) * 2: m1 m2 m3
>
> estout m1 m2 m3 using Table6_PanelA, replace  cells ("b(fmt(%9.3f) label(Coefficients)) t(fmt(%9.3f) label(z)) p(fmt(%9.3f))") stats (cons cons_t cons_p N chi2 p  r2_p nagelkerke p_corr, layout("@ @ @") fmt(3 3 3 0 3 0 3 3 3) labels("Constant" "Number of observations" "Chi square" "p(chi2)" "Pseudo R-square" "Nagelkerke R-square" "Correctly classified")) label labcol2( + + + - - + - - -, title(Predicted signs)) indicate("Industry effects = _Inew_sic3*" , labels("Included" "Not included"))  drop(_cons) type
>
>
> ***********************************************************
> 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/
>
*
*   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/

*
*   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/
```