An adverse events table categorized by System Organ Class, Dictionary-Derived Term and Greatest intensity.

aet03_1(
  adam_db,
  armvar = .study$actualarm,
  prune_0 = TRUE,
  lbl_overall = .study$lbl_overall,
  deco = std_deco("AET03"),
  .study = list(actualarm = "ACTARM", lbl_overall = NULL)
)

aet03_1_lyt(
  armvar = .study$actualarm,
  lbl_aebodsys = "",
  lbl_aedecod = "",
  severity_grade = .study$severity_grade,
  lbl_overall = .study$lbl_overall,
  deco = std_deco("AET03"),
  .study = list(actualarm = "ACTARM", lbl_overall = NULL, severity_grade = c("MILD",
    "MODERATE", "SEVERE", "LIFE THREATENING"))
)

aet03_1_pre(adam_db)

Arguments

adam_db

(dm) object containing the ADaM datasets

armvar

(character) variable used for column splitting

prune_0

(logical) remove 0 count rows

lbl_overall

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

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_aedecod

(character) text label for AEDECOD.

severity_grade

(vector of character) describing the severity levels present in the data set.

Details

  • Default Adverse Events by Greatest Intensity table.

  • Numbers represent absolute numbers of patients and fraction of N.

  • Remove zero-count rows unless overridden with prune_0 = FALSE.

  • Split columns by arm.

  • Does not include a total column by default.

  • Sort by Body System or Organ Class (SOC) and Dictionary-Derived Term (PT).

Functions

  • aet03_1_lyt: aet03_1 Layout

  • aet03_1_pre: aet03_1 Preprocessing

Examples

library(dm)

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

aet03_1(db)
#> Adverse Events by Greatest Intensity: {Specify Population}
#> Protocol: {{protocol}}
#> 
#> —————————————————————————————————————————————————————————————————————
#> MedDRA System Organ Class   A: Drug X    B: Placebo    C: Combination
#>   MedDRA Preferred Term      (N=134)       (N=134)        (N=132)    
#> —————————————————————————————————————————————————————————————————————
#> - Any Intensity -           122 (91%)    123 (91.8%)    120 (90.9%)  
#> MILD                         7 (5.2%)     9 (6.7%)         4 (3%)    
#> MODERATE                    24 (17.9%)   24 (17.9%)      23 (17.4%)  
#> SEVERE                      91 (67.9%)   90 (67.2%)      93 (70.5%)  
#> cl A.1                                                               
#>   - Any Intensity -         78 (58.2%)    75 (56%)       89 (67.4%)  
#>   MILD                      30 (22.4%)   27 (20.1%)      39 (29.5%)  
#>   MODERATE                  48 (35.8%)   48 (35.8%)      50 (37.9%)  
#>   dcd A.1.1.1.1                                                      
#>     - Any Intensity -       50 (37.3%)   45 (33.6%)      63 (47.7%)  
#>     MILD                    50 (37.3%)   45 (33.6%)      63 (47.7%)  
#>   dcd A.1.1.1.2                                                      
#>     - Any Intensity -       48 (35.8%)   48 (35.8%)      50 (37.9%)  
#>     MODERATE                48 (35.8%)   48 (35.8%)      50 (37.9%)  
#> cl B.2                                                               
#>   - Any Intensity -          79 (59%)    74 (55.2%)      85 (64.4%)  
#>   MILD                      30 (22.4%)   30 (22.4%)       33 (25%)   
#>   MODERATE                  49 (36.6%)   44 (32.8%)      52 (39.4%)  
#>   dcd B.2.2.3.1                                                      
#>     - Any Intensity -       48 (35.8%)   54 (40.3%)      51 (38.6%)  
#>     MILD                    48 (35.8%)   54 (40.3%)      51 (38.6%)  
#>   dcd B.2.1.2.1                                                      
#>     - Any Intensity -       49 (36.6%)   44 (32.8%)      52 (39.4%)  
#>     MODERATE                49 (36.6%)   44 (32.8%)      52 (39.4%)  
#> cl D.1                                                               
#>   - Any Intensity -          79 (59%)     67 (50%)       80 (60.6%)  
#>   MODERATE                  29 (21.6%)   25 (18.7%)       29 (22%)   
#>   SEVERE                    50 (37.3%)   42 (31.3%)      51 (38.6%)  
#>   dcd D.1.1.1.1                                                      
#>     - Any Intensity -       50 (37.3%)   42 (31.3%)      51 (38.6%)  
#>     SEVERE                  50 (37.3%)   42 (31.3%)      51 (38.6%)  
#>   dcd D.1.1.4.2                                                      
#>     - Any Intensity -       48 (35.8%)   42 (31.3%)      50 (37.9%)  
#>     MODERATE                48 (35.8%)   42 (31.3%)      50 (37.9%)  
#> cl D.2                                                               
#>   - Any Intensity -         47 (35.1%)   58 (43.3%)      57 (43.2%)  
#>   MILD                      47 (35.1%)   58 (43.3%)      57 (43.2%)  
#>   dcd D.2.1.5.3                                                      
#>     - Any Intensity -       47 (35.1%)   58 (43.3%)      57 (43.2%)  
#>     MILD                    47 (35.1%)   58 (43.3%)      57 (43.2%)  
#> cl B.1                                                               
#>   - Any Intensity -         47 (35.1%)   49 (36.6%)      43 (32.6%)  
#>   SEVERE                    47 (35.1%)   49 (36.6%)      43 (32.6%)  
#>   dcd B.1.1.1.1                                                      
#>     - Any Intensity -       47 (35.1%)   49 (36.6%)      43 (32.6%)  
#>     SEVERE                  47 (35.1%)   49 (36.6%)      43 (32.6%)  
#> cl C.2                                                               
#>   - Any Intensity -         35 (26.1%)   48 (35.8%)      55 (41.7%)  
#>   MODERATE                  35 (26.1%)   48 (35.8%)      55 (41.7%)  
#>   dcd C.2.1.2.1                                                      
#>     - Any Intensity -       35 (26.1%)   48 (35.8%)      55 (41.7%)  
#>     MODERATE                35 (26.1%)   48 (35.8%)      55 (41.7%)  
#> cl C.1                                                               
#>   - Any Intensity -         43 (32.1%)   46 (34.3%)      43 (32.6%)  
#>   SEVERE                    43 (32.1%)   46 (34.3%)      43 (32.6%)  
#>   dcd C.1.1.1.3                                                      
#>     - Any Intensity -       43 (32.1%)   46 (34.3%)      43 (32.6%)  
#>     SEVERE                  43 (32.1%)   46 (34.3%)      43 (32.6%)  
#> —————————————————————————————————————————————————————————————————————
#> 
#> Investigator text for AEs encoded using MedDRA version xx.x.  All counts represent patients. Multiple occurrences of the same AE in one individual are counted once at the greatest intensity for this preferred term. To the SOC Overall row counts, a patient contributes only with the AE occuring with the greatest intensity within the SOC. 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).
aet03_1(db, lbl_overall = "All Patients")
#> Adverse Events by Greatest Intensity: {Specify Population}
#> Protocol: {{protocol}}
#> 
#> ————————————————————————————————————————————————————————————————————————————————————
#> MedDRA System Organ Class   A: Drug X    B: Placebo    C: Combination   All Patients
#>   MedDRA Preferred Term      (N=134)       (N=134)        (N=132)         (N=400)   
#> ————————————————————————————————————————————————————————————————————————————————————
#> - Any Intensity -           122 (91%)    123 (91.8%)    120 (90.9%)     365 (91.2%) 
#> MILD                         7 (5.2%)     9 (6.7%)         4 (3%)         20 (5%)   
#> MODERATE                    24 (17.9%)   24 (17.9%)      23 (17.4%)      71 (17.8%) 
#> SEVERE                      91 (67.9%)   90 (67.2%)      93 (70.5%)     274 (68.5%) 
#> cl A.1                                                                              
#>   - Any Intensity -         78 (58.2%)    75 (56%)       89 (67.4%)     242 (60.5%) 
#>   MILD                      30 (22.4%)   27 (20.1%)      39 (29.5%)       96 (24%)  
#>   MODERATE                  48 (35.8%)   48 (35.8%)      50 (37.9%)     146 (36.5%) 
#>   dcd A.1.1.1.1                                                                     
#>     - Any Intensity -       50 (37.3%)   45 (33.6%)      63 (47.7%)     158 (39.5%) 
#>     MILD                    50 (37.3%)   45 (33.6%)      63 (47.7%)     158 (39.5%) 
#>   dcd A.1.1.1.2                                                                     
#>     - Any Intensity -       48 (35.8%)   48 (35.8%)      50 (37.9%)     146 (36.5%) 
#>     MODERATE                48 (35.8%)   48 (35.8%)      50 (37.9%)     146 (36.5%) 
#> cl B.2                                                                              
#>   - Any Intensity -          79 (59%)    74 (55.2%)      85 (64.4%)     238 (59.5%) 
#>   MILD                      30 (22.4%)   30 (22.4%)       33 (25%)       93 (23.2%) 
#>   MODERATE                  49 (36.6%)   44 (32.8%)      52 (39.4%)     145 (36.2%) 
#>   dcd B.2.2.3.1                                                                     
#>     - Any Intensity -       48 (35.8%)   54 (40.3%)      51 (38.6%)     153 (38.2%) 
#>     MILD                    48 (35.8%)   54 (40.3%)      51 (38.6%)     153 (38.2%) 
#>   dcd B.2.1.2.1                                                                     
#>     - Any Intensity -       49 (36.6%)   44 (32.8%)      52 (39.4%)     145 (36.2%) 
#>     MODERATE                49 (36.6%)   44 (32.8%)      52 (39.4%)     145 (36.2%) 
#> cl D.1                                                                              
#>   - Any Intensity -          79 (59%)     67 (50%)       80 (60.6%)     226 (56.5%) 
#>   MODERATE                  29 (21.6%)   25 (18.7%)       29 (22%)       83 (20.8%) 
#>   SEVERE                    50 (37.3%)   42 (31.3%)      51 (38.6%)     143 (35.8%) 
#>   dcd D.1.1.1.1                                                                     
#>     - Any Intensity -       50 (37.3%)   42 (31.3%)      51 (38.6%)     143 (35.8%) 
#>     SEVERE                  50 (37.3%)   42 (31.3%)      51 (38.6%)     143 (35.8%) 
#>   dcd D.1.1.4.2                                                                     
#>     - Any Intensity -       48 (35.8%)   42 (31.3%)      50 (37.9%)      140 (35%)  
#>     MODERATE                48 (35.8%)   42 (31.3%)      50 (37.9%)      140 (35%)  
#> cl D.2                                                                              
#>   - Any Intensity -         47 (35.1%)   58 (43.3%)      57 (43.2%)     162 (40.5%) 
#>   MILD                      47 (35.1%)   58 (43.3%)      57 (43.2%)     162 (40.5%) 
#>   dcd D.2.1.5.3                                                                     
#>     - Any Intensity -       47 (35.1%)   58 (43.3%)      57 (43.2%)     162 (40.5%) 
#>     MILD                    47 (35.1%)   58 (43.3%)      57 (43.2%)     162 (40.5%) 
#> cl B.1                                                                              
#>   - Any Intensity -         47 (35.1%)   49 (36.6%)      43 (32.6%)     139 (34.8%) 
#>   SEVERE                    47 (35.1%)   49 (36.6%)      43 (32.6%)     139 (34.8%) 
#>   dcd B.1.1.1.1                                                                     
#>     - Any Intensity -       47 (35.1%)   49 (36.6%)      43 (32.6%)     139 (34.8%) 
#>     SEVERE                  47 (35.1%)   49 (36.6%)      43 (32.6%)     139 (34.8%) 
#> cl C.2                                                                              
#>   - Any Intensity -         35 (26.1%)   48 (35.8%)      55 (41.7%)     138 (34.5%) 
#>   MODERATE                  35 (26.1%)   48 (35.8%)      55 (41.7%)     138 (34.5%) 
#>   dcd C.2.1.2.1                                                                     
#>     - Any Intensity -       35 (26.1%)   48 (35.8%)      55 (41.7%)     138 (34.5%) 
#>     MODERATE                35 (26.1%)   48 (35.8%)      55 (41.7%)     138 (34.5%) 
#> cl C.1                                                                              
#>   - Any Intensity -         43 (32.1%)   46 (34.3%)      43 (32.6%)      132 (33%)  
#>   SEVERE                    43 (32.1%)   46 (34.3%)      43 (32.6%)      132 (33%)  
#>   dcd C.1.1.1.3                                                                     
#>     - Any Intensity -       43 (32.1%)   46 (34.3%)      43 (32.6%)      132 (33%)  
#>     SEVERE                  43 (32.1%)   46 (34.3%)      43 (32.6%)      132 (33%)  
#> ————————————————————————————————————————————————————————————————————————————————————
#> 
#> Investigator text for AEs encoded using MedDRA version xx.x.  All counts represent patients. Multiple occurrences of the same AE in one individual are counted once at the greatest intensity for this preferred term. To the SOC Overall row counts, a patient contributes only with the AE occuring with the greatest intensity within the SOC. 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).
aet03_1_lyt(
  armvar = "ACTARM",
  lbl_aebodsys = "Body System or Organ Class",
  lbl_aedecod = "Dictionary-Derived Term",
  lbl_overall = NULL,
  deco = std_deco("AET03")
)
#> A Pre-data Table Layout
#> 
#> Column-Split Structure:
#> ACTARM (lvls) 
#> 
#> Row-Split Structure:
#> AEBODSYS (lvls) -> AEDECOD (lvls) 
#> 
syn_test_data() %>%
  aet03_1_pre()
#> ── Metadata ────────────────────────────────────────────────────────────────────
#> Tables: `adsl`, `adae`, `adaette`, `adcm`, `addv`, … (15 total)
#> Columns: 846
#> Primary keys: 2
#> Foreign keys: 1