This is my first question ever on Cross Validated :) I am trying to compute Cook's distance for a logistic regression model that uses Firth's penalization of the MLE, using the R library logistf . Unfortunately, the logistf class does not implement a method for computing Cook's distance like glm does, nor does it provide a method for extracting residuals. I know that brglm / brglm2 inherits from glm and thus implements both, but I have to use logistf in my particular case. I have written my own method for logistf , but I would like to be sure that it is correct. I have taken the original stats::cooks.distance.glm method, and modified the values to make it compatible with logistf . The modified method that I wrote is as follow: cooks.distance.logistf Here is an example : library(logistf) set.seed(10) Data My question is: does my method seem correct? It seems to give results more or less similar to the original cooks.distance.glm method, but given that the log-odds are slightly different when using penalized MLE, the computed Cook's distance are of course not identical. Thanks in advance for your answers! Edit: As suggested in the comments, I have compared the results to the Cook's distances computed with cooks.distance.glm for brglm and they are basically the same, though they are slightly different using brglm2 (but again, so are the model coefficients): head(cooks.distance(m2)) # logistf 1 2 3 4 5 6 0.007282252 0.005756074 0.007799143 0.015170570 0.009925262 0.010881929 hea…

Full article content could not be extracted automatically. Read the original below.