diagn

This function computes case-level diagnostics for generalized linear models. Conditional on model type, the function computes the most relevant diagnostics (circa 2024) and returns them as a data.frame object.

For example:

library(catregs)
data("Mize19AH")
m1 <- glm(alcB ~woman*parrole + age + race2 + race3 + race4 + income + ed1 + ed2 + ed3 + ed4,family="binomial",data=Mize19AH)
head(diagn(m1))
##   pearsonres           h    stdpres    deltabeta obs     devres
## 1  1.6564043 0.002758622  1.6586938 5.854382e-04   1  1.6248494
## 2  0.7848549 0.004862441  0.7867700 2.326609e-04   2  0.9797471
## 3  0.5694124 0.001265093  0.5697729 3.163242e-05   3  0.7494418
## 4  0.9671414 0.003012834  0.9686017 2.180885e-04   4  1.1491690
## 5  0.8801608 0.005112905  0.8824196 3.078228e-04   5  1.0710946
## 6 -1.1354081 0.002202117 -1.1366603 2.193390e-04   6 -1.2869975