I'm looking for a quick reference on how to do some residual analysis for logistic regression in R. Oddly enough, this has not been easy to find.
The data set I am working with is the Add.dat which can be found here: https://www.uvm.edu/~dhowell/fundamentals9/DataFiles/
Once imported I had to convert the binary variables to factors:
cols <- c(3, 4, 9, 10)
Add[,cols] <- lapply(Add[, cols], factor)
The model I'm using is very simple:
glm(formula = Repeat ~ ADDSC, family = binomial, data = Add)
I have several questions that should be relatively straight forward for the experienced:
- How do I find the leverage of the predictor variable?
- How do I find Cook's distance (namely, the cooks.distance function does seem to work for glm according to the help file, but I would just like validation of that)?
- How do I find the dfBeta values for the slope?
- Similarly, is there a way to get the delta chi-square/delta deviance for the observations?
Also, what is a good way of graphing the pearson residuals?
In short, I am basically looking to replicate the output of adding the influence command in SAS for logistic regression.