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)
}
Run the code above in your browser using DataLab