Please help! By using vif for multicollinearity come those errors:
vif (M1) Error in as.vector(y) - mean(y) : non-numeric argument to binary operator
In addition: Warning message:
In mean.default(y)
: argument is not numeric or logical: returning NA
My script:
library(lmtest)
M1 <- lm(y ~ x + x1 + x2,
data = Mydata)
summary(M1)
library(VIF)
vif (M1)
car
.VIF::vif
implements VIF-regression, which is a different beast. – Roland