Consider I have a linear model fitted in R as:
x is a continuous variable and
fac a sum contrast coded two level factor (-1,1).
now I can check the coefficients of my model and do t-tests to check if:
- the main effect /slope of x (averaged over the two factor levels) is significantly different from zero
- if the slope for x is different between my two factor levels
- what is my intercept averaged over my two factor levels with equal weighting
- if the intercepts between factor levels differ from point 3.
What I see is also done often is a type III ANOVA. The car package in R for example has the function
The model output is also providing significance values for x,fac and x:fac.
However how can I interpret them? Can I actually interpret them? as I saw that there is a controversy about the "Principle of marginality" for type III ANOVA.
Does this violation of "Principle of marginality" also hold for the interpretation of my coefficient for x (see 1) in the regression itself? Or can I still interpret my slope as the main effect or average slope expected when averaging over my factor levels with equal weights?
Do sum contrast coding and type III ANOVA yield the same results/interpretations (ignoring for a second that one uses F-tests the other t-tests) if I have two levels in my factor, but do those differ in interpretation if my factor has more levels? Or do they overall tell completely different stories? and is one better than the other? I tend to say contrast coding and interpreting coefficients is superior as it also at least gives the magnitude of the effect? -either directly by looking at coefficients or calculating this via the R package
emmeans. Does this make sense?