我不明白为什么lmerTest中的处理步骤(模型)的结果是异常的。
m0 <- lmer(seed ~ connection*age + (1|unit), data = test)
step(m0)注意:“连接”和“年龄”都设置为as.factor()
Random effects:
Chi.sq Chi.DF elim.num p.value
unit 0.25 1 1 0.6194
Fixed effects:
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
connection 1 0.01746 0.017457 1.5214 0.22142
age 1 0.07664 0.076643 6.6794 0.01178 *
connection:age 1 0.04397 0.043967 3.8317 0.05417 .
Residuals 72 0.82617 0.011475
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Least squares means:
Estimate Standard Error DF t-value Lower CI Upper CI p-value
Final model:
Call:
lm(formula = fo, data = mm, contrasts = l.lmerTest.private.contrast)
Coefficients:
(Intercept) connectionD ageB connectionD:ageB
-0.84868 -0.07852 0.01281 0.09634 为什么它不给我看最后的型号?
发布于 2014-11-23 20:06:38
这里的问题是,根据LR检验,随机效应被排除为NS。然后对固定效应模型采用anova方法,采用"lm“对象,不消除NS固定效应。您说得对,输出与"lmer“对象不同,并且没有(差异)最小二乘的意思。如果你想要后者,你可以试试lsmeans包。为了向后消除最终模型的NS效应,您可以使用stats::step函数。
https://stackoverflow.com/questions/27088136
复制相似问题