Learn R Programming

descr (version 0.3.0)

LogRegR2: Pseudo R² of logistic regression

Description

The function calculates multiple R² analogues (pseudo R²) of logistic regression.

Usage

LogRegR2(model)

Arguments

model
A logistic regression model.

Value

  • A object of class list with the calculated indexes.

Details

The function calculates McFaddens R², Cox & Snell Index, and Nagelkerke Index of a logistic regression model.

Examples

Run this code
# Suppose that "happy" is a factor and "income" is a numeric vector in a data frame:
m <- glm(happy ~ income, family=binomial(link="logit"))
LogRegR2(m)

Run the code above in your browser using DataLab