add_global_p | R Documentation |
This function uses car::Anova()
(by default) to calculate global p-values
for model covariates.
Output from tbl_regression
and tbl_uvregression
objects supported.
add_global_p(x, ...)
## S3 method for class 'tbl_regression'
add_global_p(
x,
include = everything(),
keep = FALSE,
anova_fun = global_pvalue_fun,
type = "III",
quiet,
...
)
## S3 method for class 'tbl_uvregression'
add_global_p(
x,
include = everything(),
keep = FALSE,
anova_fun = global_pvalue_fun,
type = "III",
quiet,
...
)
x |
( |
... |
Additional arguments to be passed to |
include |
( |
keep |
(scalar |
anova_fun |
( To pass a custom function, it must accept as its first argument is a model.
Note that anything passed in |
type |
Type argument passed to |
quiet |
Daniel D. Sjoberg
# Example 1 ----------------------------------
lm(marker ~ age + grade, trial) |>
tbl_regression() |>
add_global_p()
# Example 2 ----------------------------------
trial[c("response", "age", "trt", "grade")] |>
tbl_uvregression(
method = glm,
y = response,
method.args = list(family = binomial),
exponentiate = TRUE
) |>
add_global_p()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.