Xin.S
Xin.S

Reputation: 11

Error in ANOVA Type

I tried to do ANOVA with my data. I want to check if there is an interaction effect between two factors. I use the code:

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

But I got an error

In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : extra argument ‘type’ will be disregarded

No matter what type I tried, always got the same answer and the same error. There are no NAs in my data.

Upvotes: 1

Views: 991

Answers (1)

Vicky Yang
Vicky Yang

Reputation: 11

Please try this:

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

I found this link very useful: https://stat.ethz.ch/pipermail/r-help/2012-June/315986.html

Hope it helps.

Upvotes: 1

Related Questions