add_p.tbl_continuous {gtsummary} | R Documentation |
P-values for tbl_continuous
Description
P-values for tbl_continuous
Usage
## S3 method for class 'tbl_continuous'
add_p(
x,
test = NULL,
pvalue_fun = NULL,
include = everything(),
test.args = NULL,
group = NULL,
...
)
Arguments
x |
Object with class |
test |
List of formulas specifying statistical tests to perform for each
variable.
Default is two-way ANOVA when |
pvalue_fun |
Function to round and format p-values.
Default is style_pvalue.
The function must have a numeric vector input (the numeric, exact p-value),
and return a string that is the rounded/formatted p-value (e.g.
|
include |
Variables to include in output. Input may be a vector of
quoted variable names, unquoted variable names, or tidyselect select helper
functions. Default is |
test.args |
List of formulas containing additional arguments to pass to
tests that accept arguments. For example, add an argument for all t-tests,
use |
group |
Column name (unquoted or quoted) of an ID or grouping variable.
The column can be used to calculate p-values with correlated data.
Default is |
... |
Not used |
See Also
Other tbl_continuous tools:
add_overall()
,
tbl_continuous()
Examples
add_p_continuous_ex1 <-
tbl_continuous(
data = trial,
variable = age,
by = trt,
include = grade
) %>%
add_p()