Skip to content
Prev 319339 / 398506 Next

Cook's distance

Dear Koilos,

You've neglected to correct the MSE for df. Modifying your example, so that
it actually runs (your original regression doesn't work -- the lengths of x
and y differ):
linmod$residuals[1]^2/(2*sum(linmod$residuals^2)/98)*(hatvalues(linmod)[1]/(
1-hatvalues(linmod)[1])^2)
         1 
0.09853436
1 
0.09853436

I hope this helps,
 John

-----------------------------------------------
John Fox
Senator McMaster Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada