The AET02_2 table provides an overview of the number of patients experiencing adverse events and the number of adverse events categorized by Body System, High Level Term and Dictionary-Derived Term.

aet02_2(
  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_2_lyt(
  armvar = .study$actualarm,
  lbl_overall = .study$lbl_overall,
  lbl_aebodsys = "AEBODSYS",
  lbl_aehlt = "AEHLT",
  lbl_aedecod = "AEDECOD",
  deco = std_deco("AET02"),
  .study = list(actualarm = "ACTARM", lbl_overall = NULL)
)

aet02_2_pre(adam_db)

Arguments

adam_db

(dm) object containing the ADaM datasets

armvar

(character) variable used for column splitting

lbl_overall

(character) label used for overall column, if set to NULL the overall column is omitted

prune_0

(logical) remove 0 count rows

deco

(character) decoration with title, subtitles and main_footer content

.study

(list) with default values for the arguments of the function

lbl_aebodsys

(character) text label for AEBODSYS.

lbl_aehlt

(character) text label for AEHLT.

lbl_aedecod

(character) text label for AEDECOD.

Details

  • Numbers represent absolute numbers of patients 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 Body System or Organ Class, High Level Term and Dictionary-Derived Term hierarchically by highest overall frequencies.

Functions

  • aet02_2_lyt: aet02_2 Layout

  • aet02_2_pre: aet02_2 Preprocessing

Examples

library(dm)

db <- syn_test_data() %>%
  aet02_2_pre()

aet02_2(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      
#>   hlt A.1.1.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      
#>   hlt B.2.2.3                                                                                           
#>     Total number of patients with at least one adverse event   48 (35.8%)   54 (40.3%)      51 (38.6%)  
#> ————————————————————————————————————————————————————————————————————————————————————————————————————————
#> 
#> 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
aet02_2(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     
#>   hlt A.1.1.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).

db_m <- db %>%
  dm_zoom_to(adae) %>%
  mutate(AEBODSYS = formatters::with_label(AEBODSYS, "MedDRA System Organ Class")) %>%
  dm_update_zoomed()

aet02_2(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      
#>   hlt A.1.1.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).
aet02_2_lyt(
  armvar = "ACTARM",
  lbl_overall = NULL,
  lbl_aebodsys = "Body System or Organ Class",
  lbl_aehlt = "High Level Term",
  lbl_aedecod = "Dictionary-Derived Term",
  deco = std_deco("AET02")
)
#> A Pre-data Table Layout
#> 
#> Column-Split Structure:
#> ACTARM (lvls) 
#> 
#> Row-Split Structure:
#> AEBODSYS (lvls) -> AEHLT (lvls) -> AEDECOD (** analysis **) 
#> 
syn_test_data() %>%
  aet02_2_pre()
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `adsl`, `adae`, `adaette`, `adcm`, `addv`, … (15 total)
#> Columns: 846
#> Primary keys: 2
#> Foreign keys: 1