[R] Pseudo R^2 for logit - really naive question
Frank E Harrell Jr
fharrell at virginia.edu
Sun Aug 4 17:36:07 CEST 2002
The Nagelkerke R^2 is commonly used. The lrm function in the Design library computes this for logistic regression. The numerator is 1 - exp(-LR/n) where LR is the likelihood ratio chi-square stat and n is the total sample size. Divide it by the maximum attainable value of this if the model is perfect (which is a simple function of the -2 log likelihood with an intercept-only model) to get Nagelkerke's R^2. The numerator is exactly the ordinary R^2 in OLS, as LR = -n log(1-R^2) there. For a more interpretable index and one that measures purely discrimination ability, the ROC area or "C index" which is essentially a Mann-Whitney statistic based on concordance probability is recommended. The lrm function also outputs this or you can get it from the somers2 or rcorr.cens functions in the Hmisc library.
Frank Harrell
On Sun, 4 Aug 2002 09:08:46 -0400
"Paul M. Jacobson" <pmj at jciconsult.com> wrote:
> I am using GLM to calculate logit models based on cross-sectional data. I
> am now down to the hard work of making the results intelligible to very
> average readers. Is there any way to calculate a psuedo analoque to the R^2
> in standard linear regression for use as a purely descriptive statistic of
> goodness of fit? Most of the readers of my report will be vaguely familiar
> and more comfortable with R^2 than with any other regression diagnostics.
>
> Paul M. Jacobson
> Jacobson Consulting Inc.
> 80 Front Street East, Suite 720
> Toronto, ON, M5E 1T4
> Voice: +1(416)868-1141
> Farm: +1(519)463-6061/6224
> Fax: +1(416)868-1131
> E-mail: pmj at jciconsult.com
> Web: http://www.jciconsult.com/
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list