-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Milestone
Description
Feature description
In teal.modules.clinical::tm_a_mmrm variables can be defined as interaction with "BASE:AVISIT". In tidyselect this denotes column range between BASE and AVISIT.
tm_a_mmrm(
label = "MMRM",
dataname = "ADQS",
aval_var = choices_selected(c("AVAL", "CHG"), "AVAL"),
id_var = choices_selected(c("USUBJID", "SUBJID"), "USUBJID"),
arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"),
visit_var = choices_selected(c("AVISIT", "AVISITN"), "AVISIT"),
arm_ref_comp = arm_ref_comp,
paramcd = choices_selected(
choices = value_choices(data[["ADQS"]], "PARAMCD", "PARAM"),
selected = "FKSI-FWB"
),
cov_var = choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL)
)
We probably need to have a special function/class for interaction BASE:AVISIT to provide such choice. This will have to be handled in variables(), determine.variables and in merge_srv, so that:
- providing
interaction(BASE:AVISIT)shouldn't throw any errors (yes there is anbase::interactionbut it just creates a factor/no special class). determine.variablesshould determine choices and selected by keeping "interaction"merge_srvshould create an ANL containing interaction variables.
Above description is not exhaustive. There are many question marks, like for example:
picks_srv/determinereturnschoicesandselected, should we returnsc(..., "BASE:AVISIT")there orc(..., "BASE", "AVISIT").merge_srvreturns a list of variables inANL- same as inpicks_srvbut renamed if duplicated across datasets, should we returnc(..., "BASE:AVISIT")there orc(..., "BASE", "AVISIT")