为什么 lmer 在结果中将我的因素分解为所有级别?

why is lmer splitting up my factor into all its levels in the results?

我正在 运行 为具有 4 个水平的预测变量 root.type 上的单个响应变量建立线性混合模型;当我 运行 模型时,我只想要有关整个因素的信息,但它一直将其分成多个级别。有什么想法吗?

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

我只期待一个固定效应 (root.type)。我更新了软件包,但没有任何变化。

这是 R 建模包的相当标准的行为(即,summary() 函数报告参数级信息)。获取学期级结果的一些选项是:car::Anova()afex::mixed();由于您使用的是 lmerTest 而不是 lme4,因此 anova()drop1() 也可以。

对于上面显示的特定示例,

  • 因为你有 38 df,有限尺寸校正非常小(例如 2.5% 的上尾在 qt(0.975, 38)==2.02 而不是 1.96)
  • 您的 root 的术语结果可能会报告为 < 2e-16,因为各个对比的 p 值都已经非常小了...