Skip to content
Prev 12946 / 20628 Next

Differences in degrees of freedom between a mixed-effects model and a gls model using nlme

Ken Beath <ken.beath at ...> writes:
For what it's worth you can easily see what gls() is doing to
get its df, and confirm that it's naive, by printing nlme:::summary.gls:

  tTable[, "p-value"] <- 2 * pt(-abs(tTable[, "t-value"]), 
        dims$N - dims$p)

For what it's worth, I've found that the df calculations used by
lme() often fail quite badly for random-slopes models ... it's often
really hard to guess, even for simpler designs (i.e. where there
really is a precise correspondence with an F distribution -- no correlation
structures or lack of balance or crossed random effects).