2

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

pfadenhw
  • 119
  • 6

1 Answers1

0

I've found that this can be done with a different function and package: summ() function in the jtools package by setting vifs = TRUE.

However, I'd still prefer to use the tab_model() function instead since it has the appropriate R-squared value I want (Tjur), makes the confidence intervals look nicer, and has the option of including the deviance.

pfadenhw
  • 119
  • 6