logiGOF: Goodness of fit tests for a logistic regression model

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/logiGOF.R

Description

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

Usage

1
  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:

chiPearCov

Pearsons chi-square, calculated by covariate group, with p value and interpretation

chiPearIndiv

Pearsons chi-square, calculated by individual observation, with p value and interpretation

chiPearTab

Pearsons chi-square, calculated by table of covariate patterns by outcome, with p value and interpretation

OsRo

Osius & Rojek test of the logistic link, with p value and interpretation

chiDevCov

Deviance chi-square, calculated by covariate group, with p value and interpretation

chiDevIndiv

Deviance chi-square, calculated by individual observation, with p value and interpretation

chiDevTab

Deviance chi-square, calculated by table of covariate patterns by outcome, with p value and interpretation

covPatTab

Matrix of covariance patterns, used to calculate above chi-square tests of Pearson residuals and deviance

HosLem

Hosmer & Lemeshow goodness of fit test, with g quantile groups,with p value and interpretation

modHosLem

modified Hosmer & Lemeshow goodness of fit test, with g quantile groups, with p value and interpretation

CesHou

le Cessie, van Houwelingen, Copas & Hosmer unweighted sum of squares test for global goodness of fit, with p value and interpretation

Stuk

Stukels test of the appropriateness of the logistic link, with p value and interpretation

PR2

Pearsons R^2, correlation of observed outcome with predicted

ssR2

Linear regression-like sum-of-squares R^2, using covariate patterns

llR2

Log-likelohood based R^2, calculated by covariate group

ROC

Area under the Receiver Operating Curve, with 95% CI by method of DeLong

Note

A summary method is available

Warning: Will fail if cannot generate a hat matrix for the model using logiDx

Author(s)

Modified Hosmer & Lemeshow goodness of fit test: adapted from existing work by Yongmei Ni

See Also

logiDx

Examples

1
2
3
set.seed(1)
m1 <- genLogiDf(n=100)$model
logiGOF(m1)

logisticDx documentation built on May 2, 2019, 6:30 p.m.