[R] influence.measures, cooks.distance, and glm
Henric Nilsson
henric.nilsson at statisticon.se
Tue Mar 23 17:29:12 CET 2004
Dear list,
I've noticed that influence.measures and cooks.distance gives different
results for non-gaussian GLMs. For example, using R-1.9.0 alpha
(2003-03-17) under Windows:
> ## Dobson (1990) Page 93: Randomized Controlled Trial :
> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> glm.D93 <- glm(counts ~ outcome + treatment, family=poisson())
> influence.measures(glm.D93)$infmat[, 8]
1 2 3 4 5 6
0.288294276 0.309131723 0.011614584 0.030963844 0.304525117 0.444410274
7 8 9
0.459190432 0.002802907 0.377028535
> cooks.distance(glm.D93)
1 2 3 4 5 6 7
0.35162220 0.43125000 0.01468043 0.03906913 0.35640497 0.62024818 0.62510614
8 9
0.00356405 0.44408301
After looking at the influence.measure code, it seems to me that this
function always estimates the dispersion using Deviance/df. On the other
hand, the cooks.distance function uses the Pearson residuals and extracts
the dispersion from the fitted model using summary, which to me seems more
sensible for a GLM.
Can someone please shed some light on this?
//Henric
More information about the R-help
mailing list