GOFtests function

Summary of Goodness-of-Fit Tests

Summary of Goodness-of-Fit Tests

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)

Arguments

  • out: An object of class lm or glm. ## Returns

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. ## See Also

glm, lm

References

Young, D. S. (2017), Handbook of Regression Methods, CRC Press.

Examples

## 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)