I'd like to add my own column containing VIF values to a regression table that I've made with the tab_model()
function in the sjplot
package.
Here's an example of what I'm trying to do:
log_fit <- glm(Sepal.Length ~ ., data = iris)
require(sjplot)
tab <- tab_model(log_fit)
require(car)
VIF_vals <- vif(log_fit)
I'd like to add the VIF_vals$GVIF
data as a column to the tab
object, with each VIF value in the row corresponding to the same IV (e.g. Sepal Width, Petal Length, etc. etc.)