I have a made a linear mixed model using
I began with a maximal model containing 6 terms and all two-way interactions (15 total), I also have a random effect of subject ID. Of these terms, 11 interactions were significant and so were kept in the final model. I found this by dropping interactions and comparing to previous model using
anova(). As all 6 fixed terms are part of a significant interaction they remained in the model. My problem is that when I tried to test the fixed terms to find a chi-squared value for them by removing the term and comparing to the full model, the
anova output said
chisq = 0, df=0 but that
p< 2.2e-16. I don't understand how p can be so small if
chisq = 0. I also don't understand why
df=0 which would suggest I am comparing the same model when actually I have removed a term. What does this mean? Have I fit too many interactions to my data (I only have 160 data points). Is there any point in finding the chi-squared value for these fixed effects?
Probably because you write the wrong code. I got
df=0 too, and found out why.
For example: I used the formula:
y ~ x1 + x2 +x1*x2 + (1|x3) in
lmer, and then:
y ~ x2 +x1*x2 + (1|x3).
Then I used
anova to get the p-value for
x1 using the above two
lmer outputs. It gives result
chisq=0, and very small p.
I found out that I misunderstood
x1 + x2 + x1:x2, whereas
x1:x2 is the interaction of