logdiag function

Diagnostic Measures of Certain Regression Estimates

Diagnostic Measures of Certain Regression Estimates

A function for computing various residual-based and influence-based quantities from a linear regression fit using lm or a generalized linear regression fit using glm.

logdiag(out)

Arguments

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

logdiag returns a data frame with the following columns: - r.i: The raw residuals.

  • p.i: The Pearson residuals.

  • d.i: The deviance residuals.

  • stud.r.i: The Studentized raw residuals.

  • stud.p.i: The Studentized Pearson residuals.

  • stud.d.i: The Studentized deviance residuals.

  • h.ii: The leverage values.

  • C.i: The Cook's distance value.

  • C.i.bar: The average Cook's distance value when omitting observation i.

  • DFDEV: The change in the deviance statistic when omitting observation i.

  • DFCHI: The change in the Pearson's chi-square statistic when omitting observation i.

  • fit: The estimated response (fitted) values. ## See Also

glm, lm

References

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

Examples

## Diagnostic summaries 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) logdiag(glm.out)