add_vif | R Documentation |
maturing
Add the variance inflation factor (VIF) or
generalized VIF (GVIF) to the regression table.
Function uses car::vif()
to calculate the VIF.
add_vif(x, statistic = NULL, estimate_fun = NULL)
x |
|
statistic |
|
estimate_fun |
Default is |
Example 1
Example 2
Review list, formula, and selector syntax used throughout gtsummary
# Example 1 ---------------------------------- add_vif_ex1 <- lm(age ~ grade + marker, trial) %>% tbl_regression() %>% add_vif() # Example 2 ---------------------------------- add_vif_ex2 <- lm(age ~ grade + marker, trial) %>% tbl_regression() %>% add_vif(c("aGVIF", "df"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.