resp01_a_comp_stat_logical {junco} | R Documentation |
Formatted Analysis Function for Comparative Statistic in Response Tables (RESP01)
Description
This function applies to a logical
column called .var
from df
.
The response proportion is compared between the treatment arms identified
by column arm
.
Usage
resp01_a_comp_stat_logical(
df,
.var,
conf_level,
include,
arm,
strata,
formats,
methods,
stat = c("comp_stat_ci", "pval")
)
Arguments
df |
( |
.var |
( |
conf_level |
( |
include |
( |
arm |
( |
strata |
( |
formats |
( |
methods |
( |
stat |
( |
Value
The formatted result as rtables::rcell()
.
See Also
resp01_a_comp_stat_factor()
for the factor
equivalent.
Examples
dm <- droplevels(subset(formatters::DM, SEX %in% c("F", "M")))
dm$RESP <- as.logical(sample(c(TRUE, FALSE), size = nrow(DM), replace = TRUE))
resp01_a_comp_stat_logical(
dm,
.var = "RESP",
conf_level = 0.9,
include = TRUE,
arm = "SEX",
strata = "RACE",
stat = "comp_stat_ci",
method = list(comp_stat_ci = "or_cmh"),
formats = list(
comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"),
pval = jjcsformat_pval_fct(0.05)
)
)