hosmerLemeshow.test: The Hosmer-Lemeshow Test

View source: R/hosmerlemeshow.R

hosmerLemeshow.testR Documentation

The Hosmer-Lemeshow Test

Description

Performs the Hosmer-Lemeshow test for goodness-of-fit for a logistic regression model.

Usage

hosmerLemeshow.test(object, groups = 10)

Arguments

object

an object of class "glm" on which to perform the test.

groups

the number of groups to use for the test.

Value

An object of class "htest" having these components:

method

a description of the method.

statistic

the test statistic.

p.value

the attained p-level of the test statistic.

data.name

the name of object.

alternative

the alternate hypothesis—"some lack of fit."

estimate

a data frame of the size, expected value, and actual counts in each group. If the model has a single explanatory variable, then the mean value is included as column 4.

Note

The null hypothesis is "no lack of fit." Rejection of the null hypothesis indicates "some lack of fit."

References

Hosmer, D.W. and Lemeshow, S., 1980, Goodness-of-fit tests for the multiple logistic regression model: Communications in Statistics — Theory and Methods, v. 9, p. 1043–1069

See Also

binaryReg


USGS-R/smwrStats documentation built on Oct. 11, 2022, 6:15 a.m.