
Look up the ADaMIG sponsor convention for a retained variable
Source:R/spec-variable.R
retained_variable_convention.RdReturns the convention record documenting how a variable is
typically populated — e.g. TRTP carried forward from
ADSL$TRT01P. These are conventions, not enforcement
rules: multi-period studies, crossover protocols, and
analysis-visit-windowing studies legitimately deviate, and the
returned record names those exceptions.
Value
A named list with convention (the convention group
name, e.g. "treatment_variables"), description,
inherit (how the variable is populated), and
exceptions. Returns NULL when no convention covers
the variable.
See also
Other specification:
apply_spec(),
coerce_types(),
decode_var(),
detect_adam_class(),
detect_adam_classes(),
drop_unspec_vars(),
herald_spec(),
herald_spec_from_fixture(),
order_cols(),
read_spec(),
read_spec_define(),
scaffold_vars(),
sort_keys(),
spec_codelist(),
spec_datasets(),
spec_study(),
spec_vars(),
variable_codelist(),
variable_is_required(),
write_define_html(),
write_define_xml(),
write_spec()
Examples
retained_variable_convention("TRTP")
#> $convention
#> [1] "treatment_variables"
#>
#> $description
#> [1] "In non-ADSL ADaM datasets, TRTP/TRTA (+N companions) typically copy from ADSL's TRT01P/TRT01A. Multi-period and crossover studies DERIVE these per record from APERIOD.\n"
#>
#> $inherit
#> $inherit$origin
#> [1] "Predecessor"
#>
#> $inherit$predecessor_dataset
#> [1] "ADSL"
#>
#> $inherit$predecessor_variable
#> $inherit$predecessor_variable$TRTP
#> [1] "TRT01P"
#>
#> $inherit$predecessor_variable$TRTA
#> [1] "TRT01A"
#>
#> $inherit$predecessor_variable$TRTPN
#> [1] "TRT01PN"
#>
#> $inherit$predecessor_variable$TRTAN
#> [1] "TRT01AN"
#>
#>
#>
#> $exceptions
#> $exceptions[[1]]
#> $exceptions[[1]]$scenario
#> [1] "Multi-period or crossover study with APERIOD-driven treatment"
#>
#> $exceptions[[1]]$origin
#> [1] "Derived"
#>
#> $exceptions[[1]]$note
#> [1] "Method describes the APERIOD-to-TRT mapping; Predecessor is not used."
#>
#>
#>
retained_variable_convention("STUDYID")
#> $convention
#> [1] "adsl_retained_core"
#>
#> $description
#> [1] "ADaMIG Table 3.3.1 Core Variables typically flow downstream from ADSL rather than being re-derived from SDTM.DM in each dataset. Some sponsors prefer to merge fresh from SDTM.DM.\n"
#>
#> $inherit
#> $inherit$origin
#> [1] "Predecessor"
#>
#> $inherit$predecessor_dataset
#> [1] "ADSL"
#>
#> $inherit$predecessor_variable
#> [1] "<same name>"
#>
#>
#> $exceptions
#> $exceptions[[1]]
#> $exceptions[[1]]$scenario
#> [1] "Sponsor merges fresh from SDTM.DM in each ADaM dataset"
#>
#> $exceptions[[1]]$origin
#> [1] "Predecessor"
#>
#> $exceptions[[1]]$predecessor_dataset
#> [1] "DM"
#>
#> $exceptions[[1]]$note
#> [1] "Legitimate sponsor variation; flag as style difference only."
#>
#>
#>