View source: R/hosmerlemeshow.R
hosmerLemeshow.test | R Documentation |
Performs the Hosmer-Lemeshow test for goodness-of-fit for a logistic regression model.
hosmerLemeshow.test(object, groups = 10)
object |
an object of class "glm" on which to perform the test. |
groups |
the number of groups to use for the test. |
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 |
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. |
The null hypothesis is "no lack of fit." Rejection of the null hypothesis indicates "some lack of fit."
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
binaryReg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.