Hi,
has statsmodels a designated way to compute statistical tests on self-specified post-hoc contrasts in an ANOVA?
So if I have
from statsmodels.formula.api import ols
model = ols('y ~ C(factor1) + C(factor2) + C(factor1):C(factor2)', data).fit()
Then in addition to the ANOVA itself
anova_lm(model, typ=2)
I want to compute e.g. a linear contrast on factor1 (with N levels):
c = np.arange(N) - np.arange(N).mean()
which computes a t-value and a p-value for the specified contrast for factor1.
If there is no shortcut to my issue I'd of course also be grateful for a more verbose solution.