fixest icon indicating copy to clipboard operation
fixest copied to clipboard

Cook's distance for feglm objects

Open pachadotdev opened this issue 4 years ago • 1 comments

Hi

I'm interested in getting this for feglm objects (i.e. quasi-Poisson):

d %>%
  mutate(
    .cooksd = cooks.distance(fit),
    .std.resid = MASS::studres(fit),
    .hat = hatvalues(fit)
  ) %>%
  filter(.std.resid < 2 & .cooksd < 4 / (n - p - 1) & .hat < 2 * p / n)

is this in the roadmap for this pkg?

pachadotdev avatar Nov 16 '21 07:11 pachadotdev

Hi! In fact, there are many stats methods that I didn't implement for one reason: they don't play well with fixed-effects. For example the hat-values require a matrix of the size of the number of the fixed-effects and this is often not computationally feasible. But tackling this problem is in the mid term pipeline, so that should be there at some point.

lrberge avatar Nov 27 '21 13:11 lrberge