Tjur.Rsq: Tjur's R-Square for Logistic Regression Models.

Description Usage Arguments Value Note Author(s) References Examples

Description

Calculates Tjur's r-square for a logistic regression model fitted to predict a binomial outcome.

Usage

1

Arguments

x

The fitted model from a logistic regression.

Value

Numeric. Returns the value of the calculated Tjur's r-square.

Note

Tjur's r-square is the mean of the predicted outcomes for persons with a true outcome of 1, less the mean of the predicteed outcomes for persons with a true outcome of 0, multiplied by 100 to convert it into a percentage. 100% = all outcomes correctly predicted.

Author(s)

Paul Williamson

References

Allison P (2014) ‘Measures of fit for logistic regression’, Paper 1485-2014, Statistical Horizons LLC and the University of Pennnsylvania.

Tjur, T (2009) ‘Coefficients of determination in logistic regression models—A new proposal: The coefficient of discrimination’, The American Statistician, 63: 366-372.

Examples

1
2
3
4
5
# Fit logistic regression model
model <- glm(Sex ~ Age, data=survey, family=binomial)

# Calculate Tjur's r-square for that model
Tjur.Rsq(model)

DrPaulWilliamson/ENVS450 documentation built on May 9, 2019, 3:23 a.m.