denominator degrees of freedom changes for each model even though I have the same number of

Viewed 14

I hope this doesn't come off as a dumb question. I am just having difficulty wrapping my head around why my denominator degrees of freedom are different for most of my linear mixed-effects models when the total number of data values is the same for each model.

From my understanding, my degrees of freedom and denominator degrees of freedom should be the same for all my models.

"The number of degrees of freedom for the denominator is the total number of data values, minus the number of groups, or n - c."

Background info: I am running multiple linear mixed effect models in r using the lmer function and calculating the Type III Analysis of Variance Table with Kenward-Roger's method using the anova function from the car package.

each model has the same fixed effects but a different response variable. (but the amount of data is the exact same for each model)

but I am getting different DenDF for most models. See below example of two models

#Model 1
Mg_model<- lmer(average_Mg ~ Type * S_M + (1|ID), data=data)
anova(Mg_model, ddf="Kenward-Roger")
#Output from anova function for Model 1
Type III Analysis of Variance Table with Kenward-Roger's method
           Sum Sq  Mean Sq NumDF   DenDF  F value    Pr(>F)    
Type     0.004509 0.002254     2   39.16   2.8352  0.070809 .  
S_M      0.148135 0.148135     1 1073.96 186.2900 < 2.2e-16 ***
Type:S_M 0.009262 0.004631     2 1073.68   5.8238  0.003051 ** 


#Model 2
Mn_model<- lmer(average_Mn ~ Type * S_M + (1|ID), data=data)
anova(Mn_model, ddf="Kenward-Roger")
#Output from anova function for Model 2
Type III Analysis of Variance Table with Kenward-Roger's method
          Sum Sq Mean Sq NumDF   DenDF  F value Pr(>F)    
Type      0.0061  0.0031     2   39.25   0.1627 0.8504    
S_M      10.0563 10.0563     1 1076.99 534.0060 <2e-16 ***
Type:S_M  0.0243  0.0121     2 1076.55   0.6447 0.5250 

Am I doing something wrong or is this normal?

0 Answers
Related