Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: estout and Nagelkerke R2


From   "Jann, Ben" <[email protected]>
To   <[email protected]>
Subject   st: RE: estout and Nagelkerke R2
Date   Fri, 10 Sep 2004 22:47:53 +0200

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/



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