goodGLM | R Documentation |
Generalized Hosmer-Lemeshow Test for GLMs Performs a global goodness-of-fit test on objects of class 'glm'. The test is based on a generalization of the Hosmer-Lemeshow test. For more information, see the two papers by Surjanovic, Lockhart, and Loughin (2020) and Surjanovic and Loughin (2021).
goodGLM(mod, groups = 10L, group_mode = "variance", print_warnings = TRUE)
mod |
GLM object. |
groups |
Number of groups. Defaults to 10 (as in the original Hosmer-Lemeshow test). |
group_mode |
Group mode. One of "trials" or "variance", which groups observations so that the number of trials or the variance of the observations is approximately equal in each group. Defaults to "variance". |
print_warnings |
Boolean. whether to display warnings. |
#' Some parts of this code are based on http://www.chrisbilder.com/categorical/Chapter5/AllGOFTests.R by Tom Loughin Modified by Nikola Surjanovic. Previous comment from 'AllGOFTests.R':
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.