GOFtests: Summary of Goodness-of-Fit Tests

Description Usage Arguments Value References See Also Examples

Description

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

Usage

1
GOF.tests(out)

Arguments

out

An object of class lm or glm.

Value

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.

References

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

See Also

glm, lm

Examples

1
2
3
4
5
6
7
8
9
 
## 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)

HoRM documentation built on March 11, 2021, 9:07 a.m.