Dear Henric,
Since I'm replying from memory, I'm not sure that I have this quite
right, but if I recall correctly, cooks.distance.glm() originated in
the cookd.glm() function in the car package, and (except for scaling
the result as F) follows the Williams reference given in the help file.
The influence.measures function has a different origin, and I suspect
that it was originally programmed for consistency with S-PLUS.
I hope that this helps.
John
On Tue, 23 Mar 2004 17:29:12 +0100
Henric Nilsson <henric.nilsson at statisticon.se>
wrote:> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/