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.)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With