tm_t_logistic {teal.modules.clinical} | R Documentation |
teal Module: Logistic Regression
Description
This module produces a multi-variable logistic regression table consistent with the TLG Catalog template
LGRT02
available here.
Usage
tm_t_logistic(
label,
dataname,
parentname = ifelse(inherits(arm_var, "data_extract_spec"),
teal.transform::datanames_input(arm_var), "ADSL"),
arm_var = NULL,
arm_ref_comp = NULL,
paramcd,
cov_var = NULL,
avalc_var = teal.transform::choices_selected(teal.transform::variable_choices(dataname,
"AVALC"), "AVALC", fixed = TRUE),
conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95, keep_order =
TRUE),
pre_output = NULL,
post_output = NULL,
basic_table_args = teal.widgets::basic_table_args()
)
Arguments
label |
( |
dataname |
( |
parentname |
( |
arm_var |
( |
arm_ref_comp |
( |
paramcd |
( |
cov_var |
( |
avalc_var |
( |
conf_level |
( |
pre_output |
( |
post_output |
( |
basic_table_args |
( |
Value
a teal_module
object.
See Also
The TLG Catalog where additional example apps implementing this module can be found.
Examples
library(dplyr)
ADSL <- tmc_ex_adsl
ADRS <- tmc_ex_adrs %>%
filter(PARAMCD %in% c("BESRSPI", "INVET"))
arm_ref_comp <- list(
ACTARMCD = list(
ref = "ARM B",
comp = c("ARM A", "ARM C")
),
ARM = list(
ref = "B: Placebo",
comp = c("A: Drug X", "C: Combination")
)
)
app <- init(
data = cdisc_data(
ADSL = ADSL,
ADRS = ADRS,
code = "
ADSL <- tmc_ex_adsl
ADRS <- tmc_ex_adrs %>%
filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))
"
),
modules = modules(
tm_t_logistic(
label = "Logistic Regression",
dataname = "ADRS",
arm_var = choices_selected(
choices = variable_choices(ADRS, c("ARM", "ARMCD")),
selected = "ARM"
),
arm_ref_comp = arm_ref_comp,
paramcd = choices_selected(
choices = value_choices(ADRS, "PARAMCD", "PARAM"),
selected = "BESRSPI"
),
cov_var = choices_selected(
choices = c("SEX", "AGE", "BMRKR1", "BMRKR2"),
selected = "SEX"
)
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}