I am fitting a linear mixed effect model (using lmer
), and want to obtain p-values via model comparison. As far as I understand it, the procedure is: (i) create a nested model identical to the big model minus one of the variables you want to test; (ii) compare the big model to the nested model, the p-value of this comparison is attributed to the excluded variable; (iii) repeat this for each of the variables (i.e. each nested model is compared to the big model).
What happens when I test for a main effect, and the model includes an interaction term of this factor with some other factor? I learned from other threads it is wrong to have higher-level terms without lower-level ones (this one, or this one, but my mathematical understanding is limited). And yet, it seems that model comparison is standardly done to obtain p-values of main effects even when interaction terms are included (e.g. by using the function mixed()
from the afex
package with the LRT method, or manually constructing a nested model with an itneraction but without a main effect).
My question is actually twofold:
Is it wrong to rely on model comparison for p-values of main effects when I have an interaction? Or does the function
mixed()
(with the LRT method) do something other than the procedure described above?Assuming all contrasts are orthogonal, I don't understand why it is wrong to have an interaction without a main effect. With orthogonal contrasts, isn't the variability explained by interaction independent of the variability of the main effects?