GOF.tests | R Documentation |
A function that reports the Pearson statistic, the deviance statistic, and their respective p-values for goodness-of-fit testing based on a linear regression fit (lm
) or a generalized linear regression fit (glm
).
GOF.tests(out)
out |
An object of class |
GOF.tests
returns a data frame with rows corresponding to the goodness-of-fit test and columns corresponding to the respective test statistic and p-value.
Young, D. S. (2017), Handbook of Regression Methods, CRC Press.
glm
, lm
## Goodness-of-fit tests for the logistic regression fit to the
## menarche dataset.
data(menarche, package = "MASS")
glm.out = glm(cbind(Menarche, Total - Menarche) ~ Age,
family = binomial, data = menarche)
GOF.tests(glm.out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.