add_vif {gtsummary} | R Documentation |
Add Variance Inflation Factor
Description
Add the variance inflation factor (VIF) or
generalized VIF (GVIF) to the regression table.
Function uses car::vif()
to calculate the VIF.
Usage
add_vif(x, statistic = NULL, estimate_fun = NULL)
Arguments
x |
|
statistic |
|
estimate_fun |
Default is |
Example Output
Example 1
Example 2
See Also
Review list, formula, and selector syntax used throughout gtsummary
Examples
# 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"))
[Package gtsummary version 1.7.2 Index]