Suppose I have run a multiple regression model: Y = B0 + x1B1 + x2B2 +..+ xnBn, weighted by w, from a dataset with such covariates and the weight variable of size N. Say there is another column in the data, categorical (a, b or c) and not fitted as a covariate but such that the N observations can be distinguished into 3 subsets.
How would I go about measuring the influence on a particular coefficient, Bi, from all the observations that belong in group a, b or c such that I can have n + 1 sets of (including the intercept) of 3 scalable values or percentages that represent the group's impact on each coefficient? In my case, I have square terms (xi2Bi+j), interactions and dummy variables in the regression.
I'm thinking it has something to do with cook's distance, but I can only seem to find sources that measure the impact on the model as a whole and only for single observations.