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 = label_style_sigfig(digits = 2))
Arguments
x |
|
statistic |
|
estimate_fun |
Default is |
See Also
Review list, formula, and selector syntax used throughout gtsummary
Examples
# Example 1 ----------------------------------
lm(age ~ grade + marker, trial) |>
tbl_regression() |>
add_vif()
# Example 2 ----------------------------------
lm(age ~ grade + marker, trial) |>
tbl_regression() |>
add_vif(c("aGVIF", "df"))
[Package gtsummary version 2.0.0 Index]