To be honest I completely skimmed over
ContrastCoding when reading the documentation (sorry!). That being said it still restricts contrasts to a k-1 matrix. There are cases where I’d like to look at
instead of the
-1.0 -1.0 -1.0
1.0 -1.0 -1.0
0.0 2.0 -1.0
0.0 0.0 3.0
I can only think of 2 reasons why this would actually be an issue
- My data is so big I don’t want to waste the time computing the extra contrasts
- Post-hoc analysis where I want to look at very specific interactions
I may be wrong, but reading the documentation gave me the impression that contrasts are applied before fitting to the DataFrame. If this is the case then I’d need to either refit my data for every contrast or dig into the model and reweight the coefficients appropriately to achieve the same effect as refitting with a new contrast (which is what I’d do for situation 1).
I admit that my use case may be very unique, as most people probably only need to specify a very small number of contrasts for their model. Furthermore, it’s also very possible (and even probable) that this sort of ability could facilitate fishing for results.
It may even be worth having a package like
CategoricalStats that grabs coefficients from other methods to apply the appropriate statistical inference to categorical data.