【发布时间】:2021-12-13 01:54:25
【问题描述】:
我已经建立了 followinf 模型
model2 <- lmerTest::lmer(LPP2POz ~ 1 + COND + (1|ID), data = dataLPP2POz)
如果我尝试运行以下函数,它会返回此错误:
printCoefmat(summary(model2)$tTable,
has.Pvalue = T, P.values = T)
这是我正在处理的数据集中的一个简短数据框
dput(head(dataLPP2POz))
structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("01",
"04", "06", "07", "08", "09", "10", "11", "12", "13", "15", "16",
"17", "18", "19", "21", "22", "23", "25", "27", "28", "30", "44",
"46", "49"), class = "factor"), GR = c("RP", "RP", "RP", "RP",
"RP", "RP"), SES = c("V", "V", "V", "V", "V", "V"), COND = structure(c(1L,
2L, 3L, 1L, 2L, 3L), .Label = c("NEG-CTR", "NEG-NOC", "NEU-NOC"
), class = "factor"), LPP2POz = c(7.91468942320841, 9.94838815736199,
10.2186482048953, 1.07455889922813, 1.65917850515029, 3.22422743232682
)), row.names = c(NA, 6L), class = "data.frame")
Error in printCoefmat(summary(model2)$tTable, has.Pvalue = T, P.values = T) :
'x' must be coefficient matrix/data frame
任何人都能够理解错误是什么?
【问题讨论】:
-
如果我运行
summary(model2)$tTable,我会得到NULL。也许你的意思是summary(model2)$coefficients? -
精确!!这就是我正在寻找的输出。我查阅过的资料报告说,平板电脑并没有更新。
标签: r lme4 model-fitting