AET02
Table 1 (Default) Adverse Events by System Organ Class and Preferred Term Table 1aet02_1.Rd
The AET02
table provides an overview of the number of subjects experiencing adverse events and the number of advert
events categorized by Body System and Dictionary-Derived Term.
aet02_1(
adam_db,
armvar = .study$actualarm,
lbl_overall = .study$lbl_overall,
prune_0 = TRUE,
deco = std_deco("AET02"),
.study = list(actualarm = "ACTARM", lbl_overall = NULL)
)
aet02_1_lyt(
armvar = .study$actualarm,
lbl_overall = .study$lbl_overall,
lbl_aebodsys = "Body System or Organ Class",
lbl_aedecod = "Dictionary-Derived Term",
deco = std_deco("AET02"),
.study = list(actualarm = "ACTARM", lbl_overall = NULL)
)
aet02_1_pre(adam_db)
(dm
) object containing the ADaM datasets
(character
) variable used for column splitting
(character
) label used for overall column, if set to NULL
the overall column is omitted
(logical
) remove 0 count rows
(character
) decoration with title
, subtitles
and main_footer
content
(list
) with default values for the arguments of the function
(character
) text label for AEBODSYS
.
(character
) text label for AEDECOD
.
Numbers represent absolute numbers of subject and fraction of N
, or absolute number of event when specified.
Remove zero-count rows unless overridden with prune_0 = FALSE
.
Split columns by arm.
Does not include a total column by default.
Sort Dictionary-Derived Code (AEDECOD
) by highest overall frequencies.
aet02_1_lyt
: aet02_1
Layout
aet02_1_pre
: aet02_1
Preprocessing
library(dm)
db <- syn_test_data() %>%
aet02_1_pre()
aet02_1(adam_db = db) %>% head(15)
#> Adverse Events: {Specify Population}
#> Protocol: {{protocol}}
#>
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> Total number of patients with at least one adverse event 122 (91%) 123 (91.8%) 120 (90.9%)
#> Overall total number of events 609 622 703
#> cl A.1
#> Total number of patients with at least one adverse event 78 (58.2%) 75 (56%) 89 (67.4%)
#> Total number of events 132 130 160
#> dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%)
#> dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%)
#> cl B.2
#> Total number of patients with at least one adverse event 79 (59%) 74 (55.2%) 85 (64.4%)
#> Total number of events 129 138 143
#> dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%)
#> dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%)
#> cl D.1
#> Total number of patients with at least one adverse event 79 (59%) 67 (50%) 80 (60.6%)
#> Total number of events 127 106 135
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#>
#> Investigator text for AEs encoded using MedDRA version xx.x. Percentages are based on N in the column headings. For frequency counts by preferred term, multiple occurrences of the same AE in an individual are counted only once. For frequency counts of "Total number of events" rows, multiple occurrences of the same AE in an individual are counted separately. Standard footnote defining AEs included in table (e.g., includes AEs with onset from first dose of study drug through 7 days after last dose of study drug).
# Additional Examples
db_s <- db %>%
dm_filter(adsl, SEX == "F")
aet02_1(adam_db = db_s) %>% head()
#> Adverse Events: {Specify Population}
#> Protocol: {{protocol}}
#>
#> —————————————————————————————————————————————————————————————————————————————————————————————————————
#> A: Drug X B: Placebo C: Combination
#> (N=79) (N=82) (N=70)
#> —————————————————————————————————————————————————————————————————————————————————————————————————————
#> Total number of patients with at least one adverse event 72 (91.1%) 77 (93.9%) 65 (92.9%)
#> Overall total number of events 377 419 378
#> cl B.2
#> Total number of patients with at least one adverse event 46 (58.2%) 45 (54.9%) 44 (62.9%)
#> Total number of events 81 86 64
#> dcd B.2.2.3.1 30 (38%) 32 (39%) 26 (37.1%)
#> —————————————————————————————————————————————————————————————————————————————————————————————————————
#>
#> Investigator text for AEs encoded using MedDRA version xx.x. Percentages are based on N in the column headings. For frequency counts by preferred term, multiple occurrences of the same AE in an individual are counted only once. For frequency counts of "Total number of events" rows, multiple occurrences of the same AE in an individual are counted separately. Standard footnote defining AEs included in table (e.g., includes AEs with onset from first dose of study drug through 7 days after last dose of study drug).
# alternatively adam_db also accepts a names list
aet02_1(adam_db = list(adsl = db$adsl, adae = db$adae)) %>% head()
#> Adverse Events: {Specify Population}
#> Protocol: {{protocol}}
#>
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> Total number of patients with at least one adverse event 122 (91%) 123 (91.8%) 120 (90.9%)
#> Overall total number of events 609 622 703
#> cl A.1
#> Total number of patients with at least one adverse event 78 (58.2%) 75 (56%) 89 (67.4%)
#> Total number of events 132 130 160
#> dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%)
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#>
#> Investigator text for AEs encoded using MedDRA version xx.x. Percentages are based on N in the column headings. For frequency counts by preferred term, multiple occurrences of the same AE in an individual are counted only once. For frequency counts of "Total number of events" rows, multiple occurrences of the same AE in an individual are counted separately. Standard footnote defining AEs included in table (e.g., includes AEs with onset from first dose of study drug through 7 days after last dose of study drug).
aet02_1(db, lbl_overall = "All Patients") %>% head()
#> Adverse Events: {Specify Population}
#> Protocol: {{protocol}}
#>
#> —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
#> A: Drug X B: Placebo C: Combination All Patients
#> (N=134) (N=134) (N=132) (N=400)
#> —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
#> Total number of patients with at least one adverse event 122 (91%) 123 (91.8%) 120 (90.9%) 365 (91.2%)
#> Overall total number of events 609 622 703 1934
#> cl A.1
#> Total number of patients with at least one adverse event 78 (58.2%) 75 (56%) 89 (67.4%) 242 (60.5%)
#> Total number of events 132 130 160 422
#> dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%)
#> —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
#>
#> Investigator text for AEs encoded using MedDRA version xx.x. Percentages are based on N in the column headings. For frequency counts by preferred term, multiple occurrences of the same AE in an individual are counted only once. For frequency counts of "Total number of events" rows, multiple occurrences of the same AE in an individual are counted separately. Standard footnote defining AEs included in table (e.g., includes AEs with onset from first dose of study drug through 7 days after last dose of study drug).
db_m <- db %>%
dm_zoom_to(adae) %>%
mutate(AEBODSYS = formatters::with_label(AEBODSYS, "Medra System Organ Class")) %>%
dm_update_zoomed()
aet02_1(db_m) %>% head()
#> Adverse Events: {Specify Population}
#> Protocol: {{protocol}}
#>
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#> Total number of patients with at least one adverse event 122 (91%) 123 (91.8%) 120 (90.9%)
#> Overall total number of events 609 622 703
#> cl A.1
#> Total number of patients with at least one adverse event 78 (58.2%) 75 (56%) 89 (67.4%)
#> Total number of events 132 130 160
#> dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%)
#> ——————————————————————————————————————————————————————————————————————————————————————————————————————
#>
#> Investigator text for AEs encoded using MedDRA version xx.x. Percentages are based on N in the column headings. For frequency counts by preferred term, multiple occurrences of the same AE in an individual are counted only once. For frequency counts of "Total number of events" rows, multiple occurrences of the same AE in an individual are counted separately. Standard footnote defining AEs included in table (e.g., includes AEs with onset from first dose of study drug through 7 days after last dose of study drug).
aet02_1_lyt(
armvar = "ACTARM",
lbl_overall = NULL,
deco = std_deco("AET02")
)
#> A Pre-data Table Layout
#>
#> Column-Split Structure:
#> ACTARM (lvls)
#>
#> Row-Split Structure:
#> AEBODSYS (lvls) -> AEDECOD (** analysis **)
#>
syn_test_data() %>%
aet02_1_pre()
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `adsl`, `adae`, `adaette`, `adcm`, `addv`, … (15 total)
#> Columns: 846
#> Primary keys: 2
#> Foreign keys: 1