View source: R/performance_hosmer.R
performance_hosmer | R Documentation |
Check model quality of logistic regression models.
performance_hosmer(model, n_bins = 10)
model |
A |
n_bins |
Numeric, the number of bins to divide the data. |
A well-fitting model shows no significant difference between the model and the observed data, i.e. the reported p-value should be greater than 0.05.
An object of class hoslem_test
with following values:
chisq
, the Hosmer-Lemeshow chi-squared statistic; df
, degrees
of freedom and p.value
the p-value for the goodness-of-fit test.
Hosmer, D. W., and Lemeshow, S. (2000). Applied Logistic Regression. Hoboken, NJ, USA: John Wiley and Sons, Inc. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/0471722146")}
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
performance_hosmer(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.