0
$\begingroup$

I'm new to R (used to work with SPSS), and looking for a function that will output the Cox & Snell and Nagelkerke R-Square measures of logistic regression. In SPSS they are displayed as part of the regular output, but in R I'm not sure what manipulation should I employ on the glm summary to output those measures.

$\endgroup$

2 Answers 2

1
$\begingroup$

In the R rms package the lrm function outputs a large number of indexes including Nagelkerke (but not Cox-Snell). If you have $\LaTeX$ installed you can get the output automatically nicely typeset.

require(rms)
f <- lrm(y ~ rcs(age,4) * sex + race)
f     # same as print(f)
print(f, latex=TRUE)   # LaTeX markup, especially for use with knitr

The various statistics are defined in the binary logistic regression chapter in my online Regression Modeling Strategies course notes where you can also see lrm output printed.

$\endgroup$
0
$\begingroup$

Eventually I found the following very helpful package which provides exactly the measures I was interested in:

http://www.inside-r.org/packages/cran/bayloredpsych/docs/PseudoR2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.