lmer varying degrees of freedom

Hi,

I'm running a multilevel model using lmer. I noticed that when I only have ONE predictor modelled as fixed and random effect, the degrees of freedom for the t statistic of the predictor are based on the N of Level 2 (in my case Countries).
When I add TWO additional fixed effects, the number of degrees of freedom for the t statistic for Predictor 1 (modelled as fixed and random effect) is still based on the N of Level 2 while the degreess of freedom for Predictors 2 and Predictors 3 are based on the N of Level 1 (in my case persons)

CODE:
Model1 = lmer(Y ~ Predictor1 +
(Predictor1 + 1 |Country), data,
control = lmerControl(optimizer = "bobyqa"))
summary(Model1)

OUTPUT:
Number of obs: 45544, groups: Country, 54
t statistic of fixed effect of Predictor1 has df = 52.27

Model2 = lmer(Y ~ Predictor1 + Predictor2 + Predictor3
(Predictor1 + 1 |Country), data,
control = lmerControl(optimizer = "bobyqa"))
summary(Model2)

OUTPUT:
Number of obs: 45544, groups: Country, 54
t statistic of fixed effect of Predictor1 has df = 52.27
t statistic of fixed effect of Predictor2 has df = 44720
t statistic of fixed effect of Predictor3 has df = 44720

I don't have an answer for you, but if you don't get help here, you might try asking this question on Stack Overflow or Cross Validated. The maintainer of the lme4 package (Ben Bolker) often answers questions on those sites. (I'm not sure which site would be more appropriate. This seems like more of an lme4-specific question, so maybe Stack Overflow, but it's about the relatively technical issue of degrees of freedom for mixed models, so maybe Cross Validated would give you a wider range of experts who could answer the question.)

You could also take a look at the glmm FAQ (also by Ben Bolker). It discusses degrees of freedom in several places and I've linked directly to one that might have some useful information related to your question.

2 Likes

Thanks, joels. That's a great tip!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.