tm_a_gee {teal.modules.clinical} | R Documentation |
teal Module: Generalized Estimating Equations (GEE) analysis
Description
This module produces an analysis table using Generalized Estimating Equations (GEE).
Usage
tm_a_gee(
label,
dataname,
parentname = ifelse(inherits(arm_var, "data_extract_spec"),
teal.transform::datanames_input(arm_var), "ADSL"),
aval_var,
id_var,
arm_var,
visit_var,
cov_var,
arm_ref_comp = NULL,
paramcd,
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 |
( |
aval_var |
( |
id_var |
( |
arm_var |
( |
visit_var |
( |
cov_var |
( |
arm_ref_comp |
( |
paramcd |
( |
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)
data <- teal_data()
data <- within(data, {
ADSL <- tmc_ex_adsl
ADQS <- tmc_ex_adqs %>%
filter(ABLFL != "Y" & ABLFL2 != "Y") %>%
mutate(
AVISIT = as.factor(AVISIT),
AVISITN = rank(AVISITN) %>%
as.factor() %>%
as.numeric() %>%
as.factor(),
AVALBIN = AVAL < 50 # Just as an example to get a binary endpoint.
) %>%
droplevels()
})
datanames <- c("ADSL", "ADQS")
datanames(data) <- datanames
join_keys(data) <- default_cdisc_join_keys[datanames]
app <- init(
data = data,
modules = modules(
tm_a_gee(
label = "GEE",
dataname = "ADQS",
aval_var = choices_selected("AVALBIN", fixed = TRUE),
id_var = choices_selected(c("USUBJID", "SUBJID"), "USUBJID"),
arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"),
visit_var = choices_selected(c("AVISIT", "AVISITN"), "AVISIT"),
paramcd = choices_selected(
choices = value_choices(data[["ADQS"]], "PARAMCD", "PARAM"),
selected = "FKSI-FWB"
),
cov_var = choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL)
)
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}