Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: -estout- and percentage of "correctly classified" after -logit-


From   "Ben Jann" <[email protected]>
To   [email protected]
Subject   Re: st: -estout- and percentage of "correctly classified" after -logit-
Date   Tue, 17 Jun 2008 18:37:34 +0200

Herve, the results from -estat class- are not stored with -estimates
store-. You have to call -estadd- right after -estat class-.

logit  ...
estat class
estadd p_corr = r(P_corr)
estimates store m1

logit  ...
estat class
estadd p_corr = r(P_corr)
estimates store m2

...

Alternatively, write a wrapper for -estat class-

prog def estadd_estatclass, eclass
    estat class
    ereturn scalar p_corr = r(P_corr)
end

estadd estatclass: m1 m2 m3

ben


On Tue, Jun 17, 2008 at 4:07 PM, Herve STOLOWY <[email protected]> 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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index