Learn R Programming

HoRM (version 0.1.3)

GOF.tests: Summary of Goodness-of-Fit Tests

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

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

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab