Skip to content
Prev 22471 / 398502 Next

Pseudo R^2 for logit - really naive question

I could find the function in the function search option on CRAN.  However,
how to find the actual library remains a mystery to me.  I could not see it
under the list of available bundles and packages on the CRAN site
http://lib.stat.cmu.edu/R/CRAN/sources.html
I am very much a newbie to the R world and need some more direct help.

-----Original Message-----
From: owner-r-help at stat.math.ethz.ch
[mailto:owner-r-help at stat.math.ethz.ch]On Behalf Of Frank E Harrell Jr
Sent: August 4, 2002 11:36 AM
To: pmj at jciconsult.com
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Pseudo R^2 for logit - really naive question


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:

            
R^2
-.-.-
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


--
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._