方差分析类型错误

问题描述 投票:0回答:1

我试图对我的数据进行ANOVA。我想检查两个因素之间是否存在相互作用。我使用代码:

anova_3<- anova(lm(response ~ Fac_A * Fac_B, data,  type=3))

但是我有一个错误

lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)中:多余的参数“类型”将被忽略

无论我尝试哪种类型,总是得到相同的答案和相同的错误。我的数据中没有NA

r error-handling regression linear-regression anova
1个回答
0
投票

请尝试以下方法:

library(car)
anova_3 <- Anova(lm(response ~ Fac_A * Fac_B, data),  type=3).

我发现此链接非常有用:https://stat.ethz.ch/pipermail/r-help/2012-June/315986.html

希望有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.