A result of lmer (the object it returned, not a copy).
Optionaloptions: LmerSummaryOptions
ddf: "Satterthwaite" (default) or "lme4".
// R: summary(lmerTest::lmer(y ~ x + (1 | g), data))
const fit = lmer("y ~ x + (1 | g)", {
y: [3.1, 4.0, 5.2, 6.8, 7.1, 8.3, 2.2, 3.5, 3.9, 5.9, 6.1, 7.4],
x: [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],
g: ["a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d"],
});
const s = lmerSummary(fit);
s.names; // ["(Intercept)", "x"]
s.df; // [3.2717, 7]
s.pValue; // [0.032598, 7.9895e-5]
The coefficient table of a linear mixed model fitted by lmer, with Satterthwaite's degrees of freedom and the p-values of the t-tests: the
summary()of a fit by lmerTest. Equivalent tolmerTest::summary()in R.The degrees of freedom of each coefficient are Satterthwaite's: 2 var² / (g'Ag), with var its variance, g its derivative in the variance parameters (θ, σ) and A their asymptotic covariance (twice the inverse Hessian of the deviance). The derivatives are computed analytically at the exact optimum (lmerTest differentiates numerically at lme4's optimum, so its degrees of freedom typically differ in the 5th to 8th significant digit). With
ddf: "lme4"the table is lme4's (ascoefTableof the fit), without degrees of freedom and p-values.