meta <- meta_adam(population = adsl, observation = adae) |>
define_plan(plan = plan(analysis = "ae_forest_plot",
population = "apat",
observation = "apat",
parameter = "any-AE"
)) |>
define_population(name = "apat",
group = "TRTA",
subset = SAFFL == "Y" ,
label = "All Participants as Treated Population",
var = c("USUBJID", "TRTA", "RACE", "SEX", "AGE", "AGEU")) |>
define_observation(name = "apat",
group = "TRTA",
subset = SAFFL == "Y" ,
label = "All Participants as Treated Population") |>
define_analysis(name = "ae_forest_plot",
label = "Interactive AE Forest Plot") |>
define_parameter(name = "any-AE",
subset = SAFFL == "Y",
label = "Any AEs",
var = "AEDECOD", soc = "AEBODSYS", term1 = "", term2 = "") |>
meta_build()
collect_observation_record(meta, "apat", "apat", "any-AE")
collect_adam_mapping()searches keywords in the following order: population > observation > parameter > analysis. Therefore, whenpopulationandobservationare defined with the same name,populationis prioritized in variable lookup. As a result, if variables specified invarofpopulationdo not exist in data_observation, an error occurs.This may cause an error in
collect_observation_record(). For example: