Barbara
Barbara

Reputation: 1168

VIF function returning error message

I'm trying to perform a VIF on a multivariate regression model, but when I ran the vif function in r I get an error.

Code and error below:

vif(analys3.lm)
Error in if (names(coefficients(mod)[1]) == "(Intercept)") { : 
  argument is of length zero

The intercept is still there in my model though.

analys3.lm<- lm(formula = cbind(df$col1,  
                                df$col2) ~  
                  df$col3+ df$col4,
data = df)

Upvotes: 0

Views: 2143

Answers (1)

Roland
Roland

Reputation: 132706

Apparently, vif can't deal with an mlm object (multiple DVs). Run separate models and check them.

Upvotes: 1

Related Questions