I am running a linear mixed model for a single response variable on a predictor root.type
that has 4 levels; when I run the model, I just want the information on the entire factor, but it keeps splitting it up into the levels. Any ideas?
Ca.auto <- lmer(Ca ~ root.type + (1|pot), data)
summary(Ca.auto)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: Ca ~ root.type + (1 | pot)
Data: autotroph
REML criterion at convergence: -17.5
Scaled residuals:
Min 1Q Median 3Q Max
-2.2204 -0.4872 -0.1147 0.4371 3.6250
Random effects:
Groups Name Variance Std.Dev.
pot (Intercept) 0.00000 0.0000
Residual 0.02884 0.1698
Number of obs: 42, groups: pot, 12
Fixed effects:
Estimate Std. Error df t value
(Intercept) 1.62108 0.05120 38.00000 31.660
root.typeunparasitized host -0.99282 0.07241 38.00000 -13.711
root.typeattached hemiparasite -0.57593 0.07420 38.00000 -7.762
root.typeparasitized host -0.97373 0.07420 38.00000 -13.123
Pr(>|t|)
(Intercept) < 2e-16 ***
root.typeunparasitized host 2.72e-16 ***
root.typeattached hemiparasite 2.35e-09 ***
root.typeparasitized host 1.09e-15 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) rt.typnh rt.typth
rt.typnprsh -0.707
rt.typttchh -0.690 0.488
rt.typprsth -0.690 0.488 0.476
optimizer (nloptwrap) convergence code: 0 (OK)
boundary (singular) fit: see ?isSingular
I was expecting just the one fixed effect (root.type
). I updated the packages, but nothing changed.
This is fairly standard behaviour for R modeling packages (i.e., the
summary()
function reports parameter-level information). Some options for getting the term-level results are:car::Anova()
,afex::mixed()
; since you're usinglmerTest
rather thanlme4
,anova()
anddrop1()
will also work.For the particular example you show above,
qt(0.975, 38)
==2.02 rather than 1.96)root
will likely be reported as< 2e-16
, since the p-values for the individual contrasts are all already quite small ...