get_coef_rename_tribble | R Documentation |
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)
mod |
A model (e.g., returned from lm). coef() is called to extract the coefficient names. |
show |
Logical - should the output be printed to the console. In any case, it is returned invisibly |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.