Cardinal
  • Home
  • Template Catalog
  • About
  • Resources
  • Help
    • Getting Started
    • Report a Bug
    • FAQ

Overview of Adverse Events, Safety Population, Pooled Analysis (or Trial X)

FDA Table 07

table
FDA
safety
adverse events

FDA IG Shell

FDA IG example table shell

Programming Notes

Background and Instructions

Table 7: Overview of Adverse Events summarizes AEs and includes incidence of SAEs based on individual components of the SAE criteria. The event values listed in this example table are placeholders that reflect CDISC controlled terminology. The values will be replaced by those found in the clinical trial data. When CDISC controlled terminology is used in the clinical trial data, the events shown in this table will reflect the controlled terminology.

Customization

Clinical reviewers may discuss with CDS if they would like to designate additional AEs as “Serious” and include them in the “Other” category in the table. These additional AEs may include important medical events that do not result in death, are not life-threatening, and do not require hospitalization but that jeopardize the subject and require medical or surgical intervention to prevent one of these outcomes.

Output

  • Full Code
  • Table
  • ARD
Code
# FDA TABLE 07 ---------------------------------------------------------------
# Self-contained template. Run top-to-bottom to build the objects below.
# Used by tests via run_template() and published in the catalog.

library(gtsummary)
library(dplyr)

adsl <- pharmaverseadam::adsl |>
  filter(TRT01A != "Screen Failure")

adae <- pharmaverseadam::adae

# Use safety population only
adsl <- adsl |>
  filter(SAFFL == "Y")

data <- adae |>
  filter(SAFFL == "Y")

set.seed(1)
# this data set doesn't have treatment action recorded. We can generate a variable for demonstration.
aeacn_levels <- c("DRUG INTERRUPTED", "DOSE REDUCED", "DOSE RATE REDUCED", "DOSE INCREASED")
data <- data |>
  mutate(AEACN = factor(sample(aeacn_levels, size = nrow(data), replace = TRUE),
    levels = aeacn_levels
  ))

# --- PART 1: Overview of serious AEs
# Assign a label to each SAE category
sae_vars <- list(
  "SAE" = "AESER",
  "Death" = "AESDTH",
  "Life-threatening" = "AESLIFE",
  "Initial or prolonged hospitalization" = "AESHOSP",
  "Disability or permanent damage" = "AESDISAB"
)

# Summarize SAEs per category
tbl_sae <-
  lapply(
    seq_along(sae_vars),
    function(i) { # apply per category
      data <- data |>
        filter(.data[[sae_vars[[i]]]] == "Y") |>
        mutate(!!sae_vars[[i]] := names(sae_vars)[i]) # convert flag to a meaningful value
      tbl_hierarchical( # calculate rates
        data = data,
        variables = all_of(sae_vars[[i]]),
        by = TRT01A,
        id = USUBJID,
        denominator = adsl,
        label = sae_vars[[i]] ~ "Event"
      )
    }
  ) |>
  tbl_stack() |>
  modify_indent("label", rows = tbl_id1 != 1, indent = 4L)

# --- PART 2: Permanent discontinuation
disc_ae <- adae |>
  # filtering for adverse events with a "discontinued" End of Study Status
  filter(AESER == "Y" & EOSSTT == "DISCONTINUED") |>
  mutate(
    # convert label to a more meaningful value
    AEDISC = "AE leading to permanent discontinuation of treatment"
  )

tbl_disc_ae <- tbl_hierarchical( # calculate rates
  data = disc_ae,
  variables = AEDISC,
  by = TRT01A,
  id = USUBJID,
  denominator = adsl,
  label = AEDISC ~ "Event"
)

# -- PART 3: Dose modification
dose_mod_ae <- data |>
  mutate(
    AEACN = case_when( # convert to meaningful labels
      AEACN == "DRUG INTERRUPTED" ~ "AE leading to interruption of study drug",
      AEACN == "DOSE REDUCED" ~ "AE leading to reduction of study drug",
      AEACN == "DOSE RATE REDUCED" ~ "AE leading to dose delay of study drug",
      AEACN == "DOSE INCREASED" ~ "Other",
      .default = "Other"
    )
  )

tbl_dose_mod_ae <- tbl_hierarchical( # calculate rates
  data = dose_mod_ae,
  denominator = adsl,
  id = "USUBJID",
  by = "TRT01A",
  variables = "AEACN",
  label = list(AEACN ~ "Event", ..ard_hierarchical_overall.. = "AE leading to action taken of treatment"),
  overall_row = TRUE
) |>
  modify_indent(columns = label, rows = variable == "AEACN", indent = 4L)


# -- PART 4: Any AE
tbl_any_ae <- tbl_hierarchical(
  data = adae |> mutate(AESEV = factor(.data$AESEV, ordered = TRUE)),
  variables = AESEV,
  by = TRT01A,
  id = USUBJID,
  denominator = adsl,
  label = list(AESEV ~ "Event", ..ard_hierarchical_overall.. = "Any AE"),
  overall_row = TRUE
) |>
  modify_indent(columns = label, rows = variable == "AESEV", indent = 4L)

# Put it all together
tbl <- list(tbl_sae, tbl_disc_ae, tbl_dose_mod_ae, tbl_any_ae) |>
  tbl_stack() |>
  modify_header(label = "**Adverse Event Category**")


ard <- gtsummary::gather_ard(tbl)
Code
tbl
Adverse Event Category Xanomeline High Dose
N = 721
Xanomeline Low Dose
N = 961
Xanomeline Low Dose
N = 961
SAE 1 (1.4%) 2 (2.1%)
    Death 2 (2.3%) 1 (1.0%)
    Life-threatening 2 (2.3%) 2 (2.1%)
    Initial or prolonged hospitalization 5 (5.8%) 7 (9.7%) 7 (7.3%)
    Disability or permanent damage 1 (1.0%)

AE leading to permanent discontinuation of treatment 1 (1.4%) 2 (2.1%)
AE leading to action taken of treatment 69 (80%) 70 (97%) 86 (90%)
    AE leading to dose delay of study drug 42 (49%) 51 (71%) 53 (55%)
    AE leading to interruption of study drug 44 (51%) 55 (76%) 65 (68%)
    AE leading to reduction of study drug 50 (58%) 54 (75%) 56 (58%)
    Other 35 (41%) 50 (69%) 61 (64%)
Any AE 69 (80%) 70 (97%) 86 (90%)
    MILD 60 (70%) 66 (92%) 65 (68%)
    MODERATE 28 (33%) 48 (67%) 60 (63%)
    SEVERE 7 (8.1%) 8 (11%) 16 (17%)
1 n (%)
Code
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
[[1]]
[[1]][[1]]
[[1]][[1]]$tbl_hierarchical
# An ARD data frame: 15 × 13
   group1 group1_level         variable variable_level       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>    <list>               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               TRT01A   Placebo              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               TRT01A   Placebo              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               TRT01A   Placebo              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               TRT01A   Xanomeline High Dose tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               TRT01A   Xanomeline Low Dose  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Xanomeline High Dose AESER    SAE                  hierarchical n         n            1      1        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Xanomeline High Dose AESER    SAE                  hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Xanomeline High Dose AESER    SAE                  hierarchical p         %            0.0139 1.4      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline Low Dose  AESER    SAE                  hierarchical n         n            2      2        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline Low Dose  AESER    SAE                  hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline Low Dose  AESER    SAE                  hierarchical p         %            0.0208 2.1      <fn>    <NULL>  <NULL> stat_2    


[[1]][[2]]
[[1]][[2]]$tbl_hierarchical
# An ARD data frame: 15 × 13
   group1 group1_level        variable variable_level       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>              <chr>    <list>               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>              TRT01A   Placebo              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>              TRT01A   Placebo              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>              TRT01A   Placebo              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo             AESDTH   Death                hierarchical n         n            2      2        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo             AESDTH   Death                hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo             AESDTH   Death                hierarchical p         %            0.0233 2.3      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline Low Dose AESDTH   Death                hierarchical n         n            1      1        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline Low Dose AESDTH   Death                hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline Low Dose AESDTH   Death                hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_2    


[[1]][[3]]
[[1]][[3]]$tbl_hierarchical
# An ARD data frame: 15 × 13
   group1 group1_level        variable variable_level       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>              <chr>    <list>               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>              TRT01A   Placebo              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>              TRT01A   Placebo              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>              TRT01A   Placebo              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>              TRT01A   Xanomeline High Dose tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>              TRT01A   Xanomeline Low Dose  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo             AESLIFE  Life-threatening     hierarchical n         n            2      2        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo             AESLIFE  Life-threatening     hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo             AESLIFE  Life-threatening     hierarchical p         %            0.0233 2.3      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline Low Dose AESLIFE  Life-threatening     hierarchical n         n            2      2        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline Low Dose AESLIFE  Life-threatening     hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline Low Dose AESLIFE  Life-threatening     hierarchical p         %            0.0208 2.1      <fn>    <NULL>  <NULL> stat_2    


[[1]][[4]]
[[1]][[4]]$tbl_hierarchical
# An ARD data frame: 18 × 13
   group1 group1_level         variable variable_level                       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>    <list>                               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               TRT01A   Placebo                              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               TRT01A   Placebo                              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               TRT01A   Placebo                              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               TRT01A   Xanomeline High Dose                 tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               TRT01A   Xanomeline High Dose                 tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               TRT01A   Xanomeline High Dose                 tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo              AESHOSP  Initial or prolonged hospitalization hierarchical n         n            5      5        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo              AESHOSP  Initial or prolonged hospitalization hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo              AESHOSP  Initial or prolonged hospitalization hierarchical p         %            0.0581 5.8      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline High Dose AESHOSP  Initial or prolonged hospitalization hierarchical n         n            7      7        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline High Dose AESHOSP  Initial or prolonged hospitalization hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline High Dose AESHOSP  Initial or prolonged hospitalization hierarchical p         %            0.0972 9.7      <fn>    <NULL>  <NULL> stat_2    
16 TRT01A Xanomeline Low Dose  AESHOSP  Initial or prolonged hospitalization hierarchical n         n            7      7        <fn>    <NULL>  <NULL> stat_3    
17 TRT01A Xanomeline Low Dose  AESHOSP  Initial or prolonged hospitalization hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_3    
18 TRT01A Xanomeline Low Dose  AESHOSP  Initial or prolonged hospitalization hierarchical p         %            0.0729 7.3      <fn>    <NULL>  <NULL> stat_3    


[[1]][[5]]
[[1]][[5]]$tbl_hierarchical
# An ARD data frame: 12 × 13
   group1 group1_level        variable variable_level                 context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>              <chr>    <list>                         <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>              TRT01A   Placebo                        tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>              TRT01A   Placebo                        tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>              TRT01A   Placebo                        tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>              TRT01A   Xanomeline High Dose           tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>              TRT01A   Xanomeline High Dose           tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>              TRT01A   Xanomeline High Dose           tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>              TRT01A   Xanomeline Low Dose            tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>              TRT01A   Xanomeline Low Dose            tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>              TRT01A   Xanomeline Low Dose            tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Xanomeline Low Dose AESDISAB Disability or permanent damage hierarchical n         n            1      1        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Xanomeline Low Dose AESDISAB Disability or permanent damage hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Xanomeline Low Dose AESDISAB Disability or permanent damage hierarchical p         %            0.0104 1.0      <fn>    <NULL>  <NULL> stat_1    



[[2]]
[[2]]$tbl_hierarchical
# An ARD data frame: 15 × 13
   group1 group1_level         variable variable_level                                       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>    <list>                                               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               TRT01A   Placebo                                              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               TRT01A   Placebo                                              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               TRT01A   Placebo                                              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               TRT01A   Xanomeline High Dose                                 tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               TRT01A   Xanomeline High Dose                                 tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               TRT01A   Xanomeline High Dose                                 tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                                  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                                  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               TRT01A   Xanomeline Low Dose                                  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Xanomeline High Dose AEDISC   AE leading to permanent discontinuation of treatment hierarchical n         n            1      1        <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Xanomeline High Dose AEDISC   AE leading to permanent discontinuation of treatment hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Xanomeline High Dose AEDISC   AE leading to permanent discontinuation of treatment hierarchical p         %            0.0139 1.4      <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline Low Dose  AEDISC   AE leading to permanent discontinuation of treatment hierarchical n         n            2      2        <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline Low Dose  AEDISC   AE leading to permanent discontinuation of treatment hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline Low Dose  AEDISC   AE leading to permanent discontinuation of treatment hierarchical p         %            0.0208 2.1      <fn>    <NULL>  <NULL> stat_2    


[[3]]
[[3]]$tbl_hierarchical
# An ARD data frame: 54 × 13
   group1 group1_level         variable                     variable_level                           context      stat_name stat_label    stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>                        <list>                                   <chr>        <chr>     <chr>       <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               TRT01A                       Placebo                                  tabulate     n         n           86     86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               TRT01A                       Placebo                                  tabulate     N         N          254     254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               TRT01A                       Placebo                                  tabulate     p         %            0.339 33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               TRT01A                       Xanomeline High Dose                     tabulate     n         n           72     72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               TRT01A                       Xanomeline High Dose                     tabulate     N         N          254     254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               TRT01A                       Xanomeline High Dose                     tabulate     p         %            0.283 28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose                      tabulate     n         n           96     96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose                      tabulate     N         N          254     254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose                      tabulate     p         %            0.378 37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                                     hierarchical n         n           69     69       <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                                     hierarchical N         N           86     86       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                                     hierarchical p         %            0.802 80       <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                                     hierarchical n         n           70     70       <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                                     hierarchical N         N           72     72       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                                     hierarchical p         %            0.972 97       <fn>    <NULL>  <NULL> stat_2    
16 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                                     hierarchical n         n           86     86       <fn>    <NULL>  <NULL> stat_3    
17 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                                     hierarchical N         N           96     96       <fn>    <NULL>  <NULL> stat_3    
18 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                                     hierarchical p         %            0.896 90       <fn>    <NULL>  <NULL> stat_3    
19 TRT01A Placebo              AEACN                        AE leading to dose delay of study drug   hierarchical n         n           42     42       <fn>    <NULL>  <NULL> stat_1    
20 TRT01A Placebo              AEACN                        AE leading to dose delay of study drug   hierarchical N         N           86     86       <fn>    <NULL>  <NULL> stat_1    
21 TRT01A Placebo              AEACN                        AE leading to dose delay of study drug   hierarchical p         %            0.488 49       <fn>    <NULL>  <NULL> stat_1    
22 TRT01A Xanomeline High Dose AEACN                        AE leading to dose delay of study drug   hierarchical n         n           51     51       <fn>    <NULL>  <NULL> stat_2    
23 TRT01A Xanomeline High Dose AEACN                        AE leading to dose delay of study drug   hierarchical N         N           72     72       <fn>    <NULL>  <NULL> stat_2    
24 TRT01A Xanomeline High Dose AEACN                        AE leading to dose delay of study drug   hierarchical p         %            0.708 71       <fn>    <NULL>  <NULL> stat_2    
25 TRT01A Xanomeline Low Dose  AEACN                        AE leading to dose delay of study drug   hierarchical n         n           53     53       <fn>    <NULL>  <NULL> stat_3    
26 TRT01A Xanomeline Low Dose  AEACN                        AE leading to dose delay of study drug   hierarchical N         N           96     96       <fn>    <NULL>  <NULL> stat_3    
27 TRT01A Xanomeline Low Dose  AEACN                        AE leading to dose delay of study drug   hierarchical p         %            0.552 55       <fn>    <NULL>  <NULL> stat_3    
28 TRT01A Placebo              AEACN                        AE leading to interruption of study drug hierarchical n         n           44     44       <fn>    <NULL>  <NULL> stat_1    
29 TRT01A Placebo              AEACN                        AE leading to interruption of study drug hierarchical N         N           86     86       <fn>    <NULL>  <NULL> stat_1    
30 TRT01A Placebo              AEACN                        AE leading to interruption of study drug hierarchical p         %            0.512 51       <fn>    <NULL>  <NULL> stat_1    
31 TRT01A Xanomeline High Dose AEACN                        AE leading to interruption of study drug hierarchical n         n           55     55       <fn>    <NULL>  <NULL> stat_2    
32 TRT01A Xanomeline High Dose AEACN                        AE leading to interruption of study drug hierarchical N         N           72     72       <fn>    <NULL>  <NULL> stat_2    
33 TRT01A Xanomeline High Dose AEACN                        AE leading to interruption of study drug hierarchical p         %            0.764 76       <fn>    <NULL>  <NULL> stat_2    
34 TRT01A Xanomeline Low Dose  AEACN                        AE leading to interruption of study drug hierarchical n         n           65     65       <fn>    <NULL>  <NULL> stat_3    
35 TRT01A Xanomeline Low Dose  AEACN                        AE leading to interruption of study drug hierarchical N         N           96     96       <fn>    <NULL>  <NULL> stat_3    
36 TRT01A Xanomeline Low Dose  AEACN                        AE leading to interruption of study drug hierarchical p         %            0.677 68       <fn>    <NULL>  <NULL> stat_3    
37 TRT01A Placebo              AEACN                        AE leading to reduction of study drug    hierarchical n         n           50     50       <fn>    <NULL>  <NULL> stat_1    
38 TRT01A Placebo              AEACN                        AE leading to reduction of study drug    hierarchical N         N           86     86       <fn>    <NULL>  <NULL> stat_1    
39 TRT01A Placebo              AEACN                        AE leading to reduction of study drug    hierarchical p         %            0.581 58       <fn>    <NULL>  <NULL> stat_1    
40 TRT01A Xanomeline High Dose AEACN                        AE leading to reduction of study drug    hierarchical n         n           54     54       <fn>    <NULL>  <NULL> stat_2    
41 TRT01A Xanomeline High Dose AEACN                        AE leading to reduction of study drug    hierarchical N         N           72     72       <fn>    <NULL>  <NULL> stat_2    
42 TRT01A Xanomeline High Dose AEACN                        AE leading to reduction of study drug    hierarchical p         %            0.75  75       <fn>    <NULL>  <NULL> stat_2    
43 TRT01A Xanomeline Low Dose  AEACN                        AE leading to reduction of study drug    hierarchical n         n           56     56       <fn>    <NULL>  <NULL> stat_3    
44 TRT01A Xanomeline Low Dose  AEACN                        AE leading to reduction of study drug    hierarchical N         N           96     96       <fn>    <NULL>  <NULL> stat_3    
45 TRT01A Xanomeline Low Dose  AEACN                        AE leading to reduction of study drug    hierarchical p         %            0.583 58       <fn>    <NULL>  <NULL> stat_3    
46 TRT01A Placebo              AEACN                        Other                                    hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_1    
47 TRT01A Placebo              AEACN                        Other                                    hierarchical N         N           86     86       <fn>    <NULL>  <NULL> stat_1    
48 TRT01A Placebo              AEACN                        Other                                    hierarchical p         %            0.407 41       <fn>    <NULL>  <NULL> stat_1    
49 TRT01A Xanomeline High Dose AEACN                        Other                                    hierarchical n         n           50     50       <fn>    <NULL>  <NULL> stat_2    
50 TRT01A Xanomeline High Dose AEACN                        Other                                    hierarchical N         N           72     72       <fn>    <NULL>  <NULL> stat_2    
51 TRT01A Xanomeline High Dose AEACN                        Other                                    hierarchical p         %            0.694 69       <fn>    <NULL>  <NULL> stat_2    
52 TRT01A Xanomeline Low Dose  AEACN                        Other                                    hierarchical n         n           61     61       <fn>    <NULL>  <NULL> stat_3    
53 TRT01A Xanomeline Low Dose  AEACN                        Other                                    hierarchical N         N           96     96       <fn>    <NULL>  <NULL> stat_3    
54 TRT01A Xanomeline Low Dose  AEACN                        Other                                    hierarchical p         %            0.635 64       <fn>    <NULL>  <NULL> stat_3    


[[4]]
[[4]]$tbl_hierarchical
# An ARD data frame: 45 × 13
   group1 group1_level         variable                     variable_level       context      stat_name stat_label     stat stat_fmt fmt_fun warning error  gts_column
   <chr>  <list>               <chr>                        <list>               <chr>        <chr>     <chr>        <list> <list>   <list>  <list>  <list> <chr>     
 1 <NA>   <NULL>               TRT01A                       Placebo              tabulate     n         n           86      86       0       <NULL>  <NULL> stat_1    
 2 <NA>   <NULL>               TRT01A                       Placebo              tabulate     N         N          254      254      0       <NULL>  <NULL> stat_1    
 3 <NA>   <NULL>               TRT01A                       Placebo              tabulate     p         %            0.339  33.9     <fn>    <NULL>  <NULL> stat_1    
 4 <NA>   <NULL>               TRT01A                       Xanomeline High Dose tabulate     n         n           72      72       0       <NULL>  <NULL> stat_2    
 5 <NA>   <NULL>               TRT01A                       Xanomeline High Dose tabulate     N         N          254      254      0       <NULL>  <NULL> stat_2    
 6 <NA>   <NULL>               TRT01A                       Xanomeline High Dose tabulate     p         %            0.283  28.3     <fn>    <NULL>  <NULL> stat_2    
 7 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose  tabulate     n         n           96      96       0       <NULL>  <NULL> stat_3    
 8 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose  tabulate     N         N          254      254      0       <NULL>  <NULL> stat_3    
 9 <NA>   <NULL>               TRT01A                       Xanomeline Low Dose  tabulate     p         %            0.378  37.8     <fn>    <NULL>  <NULL> stat_3    
10 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                 hierarchical n         n           69      69       <fn>    <NULL>  <NULL> stat_1    
11 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                 hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
12 TRT01A Placebo              ..ard_hierarchical_overall.. TRUE                 hierarchical p         %            0.802  80       <fn>    <NULL>  <NULL> stat_1    
13 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                 hierarchical n         n           70      70       <fn>    <NULL>  <NULL> stat_2    
14 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                 hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_2    
15 TRT01A Xanomeline High Dose ..ard_hierarchical_overall.. TRUE                 hierarchical p         %            0.972  97       <fn>    <NULL>  <NULL> stat_2    
16 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                 hierarchical n         n           86      86       <fn>    <NULL>  <NULL> stat_3    
17 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                 hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_3    
18 TRT01A Xanomeline Low Dose  ..ard_hierarchical_overall.. TRUE                 hierarchical p         %            0.896  90       <fn>    <NULL>  <NULL> stat_3    
19 TRT01A Placebo              AESEV                        MILD                 hierarchical n         n           60      60       <fn>    <NULL>  <NULL> stat_1    
20 TRT01A Placebo              AESEV                        MILD                 hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
21 TRT01A Placebo              AESEV                        MILD                 hierarchical p         %            0.698  70       <fn>    <NULL>  <NULL> stat_1    
22 TRT01A Xanomeline High Dose AESEV                        MILD                 hierarchical n         n           66      66       <fn>    <NULL>  <NULL> stat_2    
23 TRT01A Xanomeline High Dose AESEV                        MILD                 hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_2    
24 TRT01A Xanomeline High Dose AESEV                        MILD                 hierarchical p         %            0.917  92       <fn>    <NULL>  <NULL> stat_2    
25 TRT01A Xanomeline Low Dose  AESEV                        MILD                 hierarchical n         n           65      65       <fn>    <NULL>  <NULL> stat_3    
26 TRT01A Xanomeline Low Dose  AESEV                        MILD                 hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_3    
27 TRT01A Xanomeline Low Dose  AESEV                        MILD                 hierarchical p         %            0.677  68       <fn>    <NULL>  <NULL> stat_3    
28 TRT01A Placebo              AESEV                        MODERATE             hierarchical n         n           28      28       <fn>    <NULL>  <NULL> stat_1    
29 TRT01A Placebo              AESEV                        MODERATE             hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
30 TRT01A Placebo              AESEV                        MODERATE             hierarchical p         %            0.326  33       <fn>    <NULL>  <NULL> stat_1    
31 TRT01A Xanomeline High Dose AESEV                        MODERATE             hierarchical n         n           48      48       <fn>    <NULL>  <NULL> stat_2    
32 TRT01A Xanomeline High Dose AESEV                        MODERATE             hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_2    
33 TRT01A Xanomeline High Dose AESEV                        MODERATE             hierarchical p         %            0.667  67       <fn>    <NULL>  <NULL> stat_2    
34 TRT01A Xanomeline Low Dose  AESEV                        MODERATE             hierarchical n         n           60      60       <fn>    <NULL>  <NULL> stat_3    
35 TRT01A Xanomeline Low Dose  AESEV                        MODERATE             hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_3    
36 TRT01A Xanomeline Low Dose  AESEV                        MODERATE             hierarchical p         %            0.625  63       <fn>    <NULL>  <NULL> stat_3    
37 TRT01A Placebo              AESEV                        SEVERE               hierarchical n         n            7      7        <fn>    <NULL>  <NULL> stat_1    
38 TRT01A Placebo              AESEV                        SEVERE               hierarchical N         N           86      86       <fn>    <NULL>  <NULL> stat_1    
39 TRT01A Placebo              AESEV                        SEVERE               hierarchical p         %            0.0814 8.1      <fn>    <NULL>  <NULL> stat_1    
40 TRT01A Xanomeline High Dose AESEV                        SEVERE               hierarchical n         n            8      8        <fn>    <NULL>  <NULL> stat_2    
41 TRT01A Xanomeline High Dose AESEV                        SEVERE               hierarchical N         N           72      72       <fn>    <NULL>  <NULL> stat_2    
42 TRT01A Xanomeline High Dose AESEV                        SEVERE               hierarchical p         %            0.111  11       <fn>    <NULL>  <NULL> stat_2    
43 TRT01A Xanomeline Low Dose  AESEV                        SEVERE               hierarchical n         n           16      16       <fn>    <NULL>  <NULL> stat_3    
44 TRT01A Xanomeline Low Dose  AESEV                        SEVERE               hierarchical N         N           96      96       <fn>    <NULL>  <NULL> stat_3    
45 TRT01A Xanomeline Low Dose  AESEV                        SEVERE               hierarchical p         %            0.167  17       <fn>    <NULL>  <NULL> stat_3    
Source Code
---
title: Overview of Adverse Events, Safety Population, Pooled Analysis (or Trial X) 
subtitle: FDA Table 07
categories: [table, FDA, safety, adverse events] 
---

::::: columns

:::: {.column width="52%"}
### FDA IG Shell

![](ig_shell.png){fig-alt="FDA IG example table shell" .lightbox width=100%}

### Programming Notes

**Background and Instructions**

Table 7: Overview of Adverse Events summarizes AEs and includes incidence of SAEs based on individual components of the SAE criteria. The event values listed in this example table are placeholders that reflect CDISC controlled terminology. The values will be replaced by those found in the clinical trial data. When CDISC controlled terminology is used in the clinical trial data, the events shown in this table will reflect the controlled terminology.

**Customization**

Clinical reviewers may discuss with CDS if they would like to designate additional AEs as "Serious" and include them in the "Other" category in the table. These additional AEs may include important medical events that do not result in death, are not life-threatening, and do not require hospitalization but that jeopardize the subject and require medical or surgical intervention to prevent one of these outcomes.

::::

:::: {.column width="4%"}
::::

:::: {.column width="44%"}
### Output

```{r out-result, echo=FALSE, fig.align='center', out.width='100%'}
knitr::include_graphics("result.png")
```

::::

:::::

::: panel-tabset
## Full Code

```{r fullcode, file="../../../inst/templates/fda-table_07.R", message=FALSE, warning=FALSE, results='hide'}
```

## Table

```{r tbl}
tbl
```

## ARD

```{r ard, message=FALSE, warning=FALSE}
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
```

:::
 
  • This website as well as code examples are licensed under the Apache License, Version 2.0.
Cookie Preferences