This function uses car::Anova()
to calculate global p-values
for model covariates.
Output from tbl_regression
and tbl_uvregression
objects supported.
add_global_p(x, ...)# S3 method for tbl_regression
add_global_p(
x,
include = everything(),
type = NULL,
keep = FALSE,
anova_fun = NULL,
quiet = NULL,
...,
terms = NULL
)
# S3 method for tbl_uvregression
add_global_p(
x,
type = NULL,
include = everything(),
keep = FALSE,
anova_fun = NULL,
quiet = NULL,
...
)
Object with class 'tbl_regression'
or 'tbl_uvregression'
Additional arguments to be passed to car::Anova
,
aod::wald.test()
or anova_fun
(if specified)
Variables to calculate global p-value for. Input may be a vector of
quoted or unquoted variable names. Default is everything()
Type argument passed to car::Anova(type=)
. Default is "III"
Logical argument indicating whether to also retain the individual
p-values in the table output for each level of the categorical variable.
Default is FALSE
.
Function that will be used in place of car::Anova()
when specified to calculate the global p-values.
function must return a tibble matching the output of
car::Anova() %>% broom::tidy()
including a columns called "term"
and "p.values"
function must accept arguments anova_fun(x, ...)
, where x
is a model object
arguments passed in ...
will be passed to anova_fun(...)
the add_global_p(type=)
argument is ignored in anova_fun=
a common function used here is tidy_wald_test()
, a wrapper for aod::wald.test()
Logical indicating whether to print messages in console. Default is
FALSE
DEPRECATED. Use include=
argument instead.
Example 1
Example 2
Daniel D. Sjoberg
Review list, formula, and selector syntax used throughout gtsummary
Other tbl_uvregression tools:
add_q()
,
bold_italicize_labels_levels
,
inline_text.tbl_uvregression()
,
modify
,
tbl_merge()
,
tbl_split()
,
tbl_stack()
,
tbl_strata()
,
tbl_uvregression()
Other tbl_regression tools:
add_q()
,
bold_italicize_labels_levels
,
combine_terms()
,
inline_text.tbl_regression()
,
modify
,
tbl_merge()
,
tbl_regression()
,
tbl_split()
,
tbl_stack()
,
tbl_strata()