Learn R Programming

LogisticDx (version 0.1)

logiGOF: Goodness of fit tests for a logistic regression model

Description

Gives 15 commonly employed measures of goodness of fit for a logistic regression model

Usage

logiGOF(x, g = 10)

Arguments

x
A model of class glm
g
No. groups (quantiles) into which to split observations for Hosmer-Lemeshow and modified Hosmer-Lemeshow tests.

Value

  • A list of class logiGOF with the following items:
  • chiPearCovPearsons chi-square, calculated by covariate group, with $p$ value and interpretation
  • chiPearIndivPearsons chi-square, calculated by individual observation, with $p$ value and interpretation
  • chiPearTabPearsons chi-square, calculated by table of covariate patterns by outcome, with $p$ value and interpretation
  • OsRoOsius & Rojek test of the logistic link, with $p$ value and interpretation
  • chiDevCovDeviance chi-square, calculated by covariate group, with $p$ value and interpretation
  • chiDevIndivDeviance chi-square, calculated by individual observation, with $p$ value and interpretation
  • chiDevTabDeviance chi-square, calculated by table of covariate patterns by outcome, with $p$ value and interpretation
  • covPatTabMatrix of covariance patterns, used to calculate above chi-square tests of Pearson residuals and deviance
  • HosLemHosmer & Lemeshow goodness of fit test, with g quantile groups,with $p$ value and interpretation
  • modHosLemmodified Hosmer & Lemeshow goodness of fit test, with g quantile groups, with $p$ value and interpretation
  • CesHoule Cessie, van Houwelingen, Copas & Hosmer unweighted sum of squares test for global goodness of fit, with $p$ value and interpretation
  • StukStukels test of the appropriateness of the logistic link, with $p$ value and interpretation
  • PR2Pearsons R^2, correlation of observed outcome with predicted
  • ssR2Linear regression-like sum-of-squares R^2, using covariate patterns
  • llR2Log-likelohood based R^2, calculated by covariate group
  • ROCArea under the Receiver Operating Curve, with 95% CI by method of DeLong

See Also

logiDx

Examples

Run this code
set.seed(1)
m1 <- genLogiDf(n=100)$model
logiGOF(m1)

Run the code above in your browser using DataLab