Cook's distance for least absolute deviation (lad) regressions
Dear Kelly and Jim,
On 2022-03-20 9:40 p.m., Jim Lemon wrote:
Hi Kelly, Perhaps the best place to look is the "car" package. There is a somewhat confusing reference in the "cookd" function help page to the "cooks.distance" function in the "base" package that doesn't seem to be there. Whether this is the case or not, I think you can still use the "cookd" alias.
cookd() in the car package has been defunct for some time.
To address the original question: One can compute Cook's distances for
*any* regression model by brute-force, omitting each case i in turn and
computing the Wald F or chisquare test statistic for the "hypothesis"
that the deleted estimate of the regression coefficients b_{-i} is equal
to the estimate b for all of the data. In a linear model, D can be
computed much more efficiently based on the hatvalues, etc., without
having to refit the model n times, but that's not generally the case,
unless the model can be linearized (as for a GLM fit by IWLS).
I'm insufficiently familiar with the computational details of LAD
regression (or quantile regression more generally) to know whether a
more efficient computation is possible there, but unless the data set is
very large, in which case it's highly unlikely that influence of
individual cases is an issue, the brute-force approach should be
feasible and very easy to program.
I hope this helps,
John
John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://socialsciences.mcmaster.ca/jfox/ > > Jim > > On Mon, Mar 21, 2022 at 11:57 AM Kelly Thompson <kt1572757 at gmail.com> wrote: >> >> I'm wanting to calculate Cook's distance for least absolute deviation >> (lad) regressions. >> >> Which R packages and functions offer this? >> >> Thanks! >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.