Usually, the coefficients in a statistical model such as those returned from lm()
need to be renamed for reporting, particularly when dummy/indicator variables are involved.
This function returns the code to set up a rename tribble that can then be adjusted
and passed, for instance, to the report_lm_with_std()
function.
get_coef_rename_tribble(mod, show = TRUE)
Code to be edited and passed to tibble::tribble() to create the coef_renames argument for
report_lm_with_std()
and similar functions. 'New' coefficient names are minimally
transformed, but are primarily intended to be placeholders.
mod <- lm(mpg ~ wt, mtcars)
get_coef_rename_tribble(mod)
#> tibble::tribble(
#> ~old, ~new,
#> "(Intercept)", "(Intercept)",
#> "wt", "Wt"
#> )