Hi Community,
I'm trying to reconcile Cook's Distances computed in glm. The
following snippet of code shows that the Cook's Distances contours on
the plot of Residuals v Leverage do not seem to be the same as the
values produced by cooks.distance() or in the Cook's Distance against
observation number plot.
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
d.AD <- data.frame(treatment, outcome, counts)
glm.D93 <- glm(counts ~ outcome + treatment, family=poisson())
opar <- par(mfrow=c(2,1))
plot(glm.D93, which=c(4,5))
par(opar)
cooks.distance(glm.D93)
The difference is reasonably moderate in this case. My suspicions
were aroused by a case in which the plot showed five or size points
greater than 1, none of which could be identified in the output of the
function.