custom_tidiers | R Documentation |
maturing Collection of tidiers that can be utilized in gtsummary. See details below.
tidy_standardize(
x,
exponentiate = FALSE,
conf.level = 0.95,
conf.int = TRUE,
...,
quiet = FALSE
)
tidy_bootstrap(
x,
exponentiate = FALSE,
conf.level = 0.95,
conf.int = TRUE,
...,
quiet = FALSE
)
tidy_robust(
x,
exponentiate = FALSE,
conf.level = 0.95,
conf.int = TRUE,
vcov = NULL,
vcov_args = NULL,
...,
quiet = FALSE
)
pool_and_tidy_mice(x, pool.args = NULL, ..., quiet = FALSE)
tidy_gam(x, conf.int = FALSE, exponentiate = FALSE, conf.level = 0.95, ...)
tidy_wald_test(x, tidy_fun = NULL, ...)
x |
( |
exponentiate |
(scalar |
conf.level |
(scalar |
conf.int |
(scalar |
... |
Arguments passed to method;
|
quiet |
|
vcov , vcov_args |
Arguments passed to |
pool.args |
(named |
tidy_fun |
( |
These tidiers are passed to tbl_regression()
and tbl_uvregression()
to
obtain modified results.
tidy_standardize()
tidier to report standardized coefficients. The
parameters
package includes a wonderful function to estimate standardized coefficients.
The tidier uses the output from parameters::standardize_parameters()
, and
merely takes the result and puts it in broom::tidy()
format.
tidy_bootstrap()
tidier to report bootstrapped coefficients. The
parameters
package includes a wonderful function to estimate bootstrapped coefficients.
The tidier uses the output from parameters::bootstrap_parameters(test = "p")
, and
merely takes the result and puts it in broom::tidy()
format.
tidy_robust()
tidier to report robust standard errors, confidence intervals,
and p-values. The parameters
package includes a wonderful function to calculate robust standard errors, confidence intervals, and p-values
The tidier uses the output from parameters::model_parameters()
, and
merely takes the result and puts it in broom::tidy()
format. To use this
function with tbl_regression()
, pass a function with the arguments for
tidy_robust()
populated.
pool_and_tidy_mice()
tidier to report models resulting from multiply imputed data
using the mice package. Pass the mice model object before the model results
have been pooled. See example.
tidy_wald_test()
tidier to report Wald p-values, wrapping the
aod::wald.test()
function.
Use this tidier with add_global_p(anova_fun = tidy_wald_test)
# Example 1 ----------------------------------
mod <- lm(age ~ marker + grade, trial)
tbl_stnd <- tbl_regression(mod, tidy_fun = tidy_standardize)
tbl <- tbl_regression(mod)
tidy_standardize_ex1 <-
tbl_merge(
list(tbl_stnd, tbl),
tab_spanner = c("**Standardized Model**", "**Original Model**")
)
# Example 2 ----------------------------------
# use "posthoc" method for coef calculation
tbl_regression(mod, tidy_fun = \(x, ...) tidy_standardize(x, method = "posthoc", ...))
# Example 3 ----------------------------------
# Multiple Imputation using the mice package
set.seed(1123)
pool_and_tidy_mice_ex3 <-
suppressWarnings(mice::mice(trial, m = 2)) |>
with(lm(age ~ marker + grade)) |>
tbl_regression()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.