Dear Ben:
As usual, it works perfectly.
Here are my final command lines:
estadd nagelkerke: 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 Table5, 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, layout("@ @ @") fmt(%9.3f %9.3f
%9.3f %9.0f %9.3f %9.0f %9.3f %9.3f) labels("Constant" "Number of
observations" "Chi square" "p(chi2)" "Pseudo R-square" "Nagelkerke
R-square")) label labcol2( + + - + - -, title(Predicted signs))
indicate("Industry effects = _Inew_sic3*" "Country effects =
_Icountry*") drop(_cons)
Thank you again for your help.
Best regards
Hervé
***********************************************************
Professeur/Professor
HEC Paris
Département Comptabilité Contrôle 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" <[email protected]> 10:48 am 1/9/2008 >>>
> I only get the constant coefficient for the last model ...
Change
. estadd scalar cons = _b[_cons]
to
. estadd scalar cons = _b[_cons]: m1 m2 m3
or
. estadd scalar cons = _b[_cons]: *
> ... and without the t and the p.
Hm, if you use the -estadd scalar- approach then you also have to add
the t and p of the cons in the same way. For the t/z-value:
. estadd scalar cons_t = _b[_cons]/_se[_cons]
The computation of the pvalue depends on estimation command. For
regress:
. estadd scalar cons_p = ttail(e(df_r), abs(_b[_cons]/_se[_cons])) *
2
For many other commands:
. estadd scalar cons_p = (1-normal(abs(_b[_cons]/_se[_cons]))) * 2
Then in the -stats()- option you have to use the layout() suboption to
get the t and p in the right place. In your case:
stats(cons cons_t cons_p N ..., layout("@ @ @") ...)
ben
On Jan 8, 2008 5:07 PM, Herve STOLOWY <[email protected]> wrote:
> Dear Ben:
>
> Thanks once more for your tremendous help. I am almost done but meet
a
> little difficulty with the constant. Here are my command lines:
>
> ....
>
> estimates store m3, title(Panel C: Basic model with dummies - 2004)
>
> estadd nagelkerke: m1 m2 m3
> estadd scalar cons = _b[_cons]
>
> estout m1 m2 m3 using Table5, replace cells ("b(fmt(%9.3f)
> label(Coefficients)) t(fmt(%9.3f) label(z)) p(fmt(%9.3f))") stats
(cons
> N chi2 p r2_p nagelkerke, fmt(%9.3f %9.3f %9.3f %9.0f %9.3f %9.3f)
> labels("Constant" "Number of observations" "Chi square" "p(chi2)"
> "Pseudo R-square" "Nagelkerke R-square")) label labcol2( + + - + -
-,
> title(Predicted signs)) indicate("Industry effects = _Inew_sic3*"
> "Country effects = _Icountry*") drop(_cons)
>
> I only get the constant coefficient for the last model and without
the t
> and the p. Is there a way to get the three constants with the t and
p
> values?
>
> Best regards
>
> Herve
>
> ***********************************************************
> Professeur/Professor
> HEC Paris
> Département Comptabilité Contrôle 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" <[email protected]> 08/01/08 16:30 >>>
> > - The row "Country effects" has been added below the constant
whereas,
> > traditionnally, dummies are displayed above the constant. Can I
change
> > the order?
>
> No.
>
> What you can do is add the cons to an e(scalar) and then print the
> constant in the footer. Example:
>
> . sysuse auto, clear
> (1978 Automobile Data)
>
> . qui xi: reg price mpg weight i.rep
>
> . estadd scalar cons = _b[_cons]
>
> . estout, indicate(rep = _Irep*) drop(_cons) stats(cons)
>
> .
> b
> mpg -63.0971
> weight 2.093066
> rep Yes
> cons -598.9665
>
> By the way, note that you can also use this approach to include the
> dummy indicators (instead of using -indicate()-). Example:
>
> . sysuse auto, clear
> (1978 Automobile Data)
>
> . eststo clear
>
> . qui eststo: reg price mpg weight
>
> . estadd local rep "No"
>
> . qui eststo: xi: reg price mpg weight i.rep
>
> . estadd local rep "Yes"
>
> . estadd scalar cons = _b[_cons] : *
>
> . estout, drop(_Irep* _cons) stats(rep cons) style(smcl)
>
> --------------------------------------
> est1 est2
> b b
> --------------------------------------
> mpg -49.51222 -63.0971
> weight 1.746559 2.093066
> --------------------------------------
> rep No Yes
> cons 1946.069 -598.9665
> --------------------------------------
>
> > - I have two series of dummies in my third model. I would like to
have
> > the same treatment for new_sic3 (the industry). I read the help
file
> but
> > I don't understand if I can have two rows added for two series of
> > dummies in the same output.
>
> You have to include the groups in quotes. Example:
>
> . sysuse auto, clear
> (1978 Automobile Data)
>
> . qui xi: reg price mpg weight i.rep i.foreign
>
> . estout, indicate("rep = _Irep*" "for=_Ifor*")
>
> .
> b
> mpg 24.37505
> weight 3.545366
> _cons -6938.01
> rep Yes
> for Yes
>
> ben
>
> On Jan 8, 2008 3:20 PM, Herve STOLOWY <[email protected]> wrote:
> > Dear Austin:
> >
> > Thank you for your quick reply. It does not work with the
> > drop(_Icountry*). However, it works with "indicate(country effects
=
> > _Icountry*)" only. That's perfect.
> >
> > But I have now two additional questions on the same issue:
> >
>
> > - I have two series of dummies in my third model. I would like to
have
> > the same treatment for new_sic3 (the industry). I read the help
file
> but
> > I don't understand if I can have two rows added for two series of
> > dummies in the same output.
> >
> > Best regards
> >
> > Herve
> >
> >
> > ***********************************************************
> > Professeur/Professor
> > HEC Paris
> > Département Comptabilité Contrôle de gestion / Dept of Accounting
and
> > Manage> mail: stolowy at hec dot fr
> > web: http://www.hec.fr/stolowy
> > >>> "Austin Nichols" <[email protected]> 08/01/08 15:02 >>>
> > Extraneous parenthesis removed:
> >
> > The help file for -estout- suggests putting
> > drop(_Icountry*) indicate(country effects = _Icountry*)
> > for
> > indicate(country effects = i.country)
> > in your call to -estout- but I have not tested it.
*
* 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/