Nagelkerke: Calculate Nagelkerke's R squared.

NagelkerkeR2R Documentation

Calculate Nagelkerke's R squared.

Description

To evaluate the goodness of fit of the logistic regression model, calculating Nagelkerke's R squared from the result of glm(). The Nagelkerke's R squared means the power of explanation of the model.

Usage

NagelkerkeR2(rr)

Arguments

rr

The object with class "glm" and "lm", which would be generated by glm().

Value

N

The number of observations in which the model were fitted.

R2

Nagelkerke's R squared.

Author(s)

Minato Nakazawa minatonakazawa@gmail.com https://minato.sip21c.org/

References

Nagelkerke N (1991) A note on a general definition of the coefficient of determination. Biometrika, 78: 691-692.

Faraway JJ (2006) Extending the linear models with R: Generalized linear, mixed effects and nonparametric regression models. Chapman and Hall.

https://minato.sip21c.org/grad/infop-text2012.pdf

Examples

 res <- glm(cbind(ncases,ncontrols) ~ agegp+alcgp+tobgp, data=esoph, family=binomial())
 summary(res)
 NagelkerkeR2(res)

fmsb documentation built on May 29, 2024, 2:02 a.m.

Related to Nagelkerke in fmsb...