I just encountered a problem while analyzing experimental data using lme4 and lmertest. In the experiment, 67 subjects gave 3 ratings for 50 stimuli shown for 3 different durations (a total of 10050 responses). I used the same nested model for each of the 3 ratings (the only difference being the response variable), but the denominator dfs are different for each of the 3 lmertest anovas (1808, 9848, 1807). How is this possible?
A similar question was asked fro mixed effects in SPSS, but remained unanswered. Different degrees of freedom when using the same mixed effect model (SPSS)
Edit: Looking more closely at the model using summary(), I found that one group of the analysis that yielded much higher dfs (9848) has a variance of 0. Might this be the reason (the factor cd is nested within the duration factor named dur)?
Low df model:
Random effects:
Groups Name Variance Std.Dev.
cd:(dur:subj) (Intercept) 0.13794 0.3714
dur:subj (Intercept) 0.04408 0.2099
subj (Intercept) 0.41425 0.6436
Residual 1.58692 1.2597
Number of obs: 10050, groups: cd:(dur:subj), 2010; dur:subj, 201; subj, 67
High df model:
Random effects:
Groups Name Variance Std.Dev.
cd:(dur:subj) (Intercept) 0.00000 0.0000
dur:subj (Intercept) 0.06821 0.2612
subj (Intercept) 0.39013 0.6246
Residual 1.74595 1.3213
Number of obs: 10050, groups: cd:(dur:subj), 2010; dur:subj, 201; subj, 67
lmerTest
uses a form of the Satterthwaite approximation; I would dig into the guts to see what's going on. $\endgroup$