VIF function returning error message

1.9k Views Asked by At

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)
1

There are 1 best solutions below

1
On BEST ANSWER

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