Herve wrote:
> After a logit, I created a do-file which computes the Nagelkerke R2.
>
> I would like to add this figure to the table of results with
> estout. Is it possible?
It is possible, needs some minimal programming, though (see the
"Programming subroutines" section in the helpfile; further
explanations are given in the file "_estout_stat_p.ado",
which is part of the -estout- package).
(Please make sure that you are running the latest version
of -estout-!)
Suppose your program is called -Nagelkerke- and returns
Nagelkerke R2 in -r(nagelkerke)-. Then save the program
program _estout_stat_nagelkerke
Nagelkerke
c_local value "`r(nagelkerke)'"
end
as "_estout_stat_nagelkerke.ado" in the current directory
or somewhere else in the ado-path (or just include the
program in your do-file). Then type
. estout ..., stats(chi2 N r2_p, calc(nagelkerke))
To change the order of the statistics, type, e.g.
. estout ..., stats(chi2 N nagelkerke r2_p, calc(nagelkerke))
Another possibility is, of course, to write a program which
adds e(nagelkerke) to the e-returns of the estimates.
ben
*
* 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/