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

Subjects With Adverse Events Leading to Treatment Discontinuation by System Organ Class and Preferred Term, Safety Population, Pooled Analysis (or Trial X)

FDA Table 12

table
FDA
safety
adverse events

FDA IG Shell

FDA IG example table shell

Programming Notes

Background and Instructions

N/A (per FDA IG)

Customization

N/A (per FDA IG)

Output

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

library(dplyr)
library(cards)
library(gtsummary)

adsl <- random.cdisc.data::cadsl
adae <- random.cdisc.data::cadae
adae$DCSREAS[is.na(adae$DCSREAS)] <- "ADVERSE EVENT"

# Pre-processing --------------------------------------------
adsl <- adsl |>
  filter(SAFFL == "Y") # safety population

data <- adae |>
  filter(
    # safety population
    SAFFL == "Y",
    # discontinuation due to AE
    DCSREAS == "ADVERSE EVENT"
  )

ard <- ard_stack_hierarchical(
  data,
  variables = c(AEBODSYS, AEDECOD),
  by = TRT01A,
  denominator = adsl,
  id = USUBJID
)

tbl <- tbl_hierarchical(
  data,
  variables = c(AEBODSYS, AEDECOD),
  by = TRT01A,
  id = USUBJID,
  denominator = adsl,
  overall_row = TRUE,
  label = list(..ard_hierarchical_overall.. = "Subjects with at least one AE leading to treatment discontinuation")
)

ard <- gtsummary::gather_ard(tbl)
Code
tbl
Body System or Organ Class
    Dictionary-Derived Term
A: Drug X
N = 1341
B: Placebo
N = 1341
C: Combination
N = 1321
Subjects with at least one AE leading to treatment discontinuation 86 (64%) 93 (69%) 90 (68%)
cl A.1 53 (40%) 55 (41%) 69 (52%)
    dcd A.1.1.1.1 37 (28%) 37 (28%) 50 (38%)
    dcd A.1.1.1.2 33 (25%) 31 (23%) 40 (30%)
cl B.1 35 (26%) 41 (31%) 36 (27%)
    dcd B.1.1.1.1 35 (26%) 41 (31%) 36 (27%)
cl B.2 55 (41%) 56 (42%) 65 (49%)
    dcd B.2.1.2.1 36 (27%) 33 (25%) 35 (27%)
    dcd B.2.2.3.1 34 (25%) 41 (31%) 41 (31%)
cl C.1 28 (21%) 36 (27%) 32 (24%)
    dcd C.1.1.1.3 28 (21%) 36 (27%) 32 (24%)
cl C.2 26 (19%) 39 (29%) 43 (33%)
    dcd C.2.1.2.1 26 (19%) 39 (29%) 43 (33%)
cl D.1 51 (38%) 51 (38%) 60 (45%)
    dcd D.1.1.1.1 29 (22%) 31 (23%) 37 (28%)
    dcd D.1.1.4.2 33 (25%) 34 (25%) 39 (30%)
cl D.2 35 (26%) 46 (34%) 44 (33%)
    dcd D.2.1.5.3 35 (26%) 46 (34%) 44 (33%)
1 n (%)
Code
withr::local_options(width = 9999, tibble.print_max = Inf)
print(ard, columns = "all")
$tbl_hierarchical
# An ARD data frame: 171 × 15
    group1 group1_level   group2   group2_level variable                     variable_level context      stat_name stat_label    stat stat_fmt fmt_fun warning error  gts_column
    <chr>  <list>         <chr>    <list>       <chr>                        <list>         <chr>        <chr>     <chr>       <list> <list>   <list>  <list>  <list> <chr>     
  1 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       A: Drug X      tabulate     n         n          134     134      0       <NULL>  <NULL> stat_1    
  2 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       A: Drug X      tabulate     N         N          400     400      0       <NULL>  <NULL> stat_1    
  3 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       A: Drug X      tabulate     p         %            0.335 33.5     <fn>    <NULL>  <NULL> stat_1    
  4 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       B: Placebo     tabulate     n         n          134     134      0       <NULL>  <NULL> stat_2    
  5 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       B: Placebo     tabulate     N         N          400     400      0       <NULL>  <NULL> stat_2    
  6 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       B: Placebo     tabulate     p         %            0.335 33.5     <fn>    <NULL>  <NULL> stat_2    
  7 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       C: Combination tabulate     n         n          132     132      0       <NULL>  <NULL> stat_3    
  8 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       C: Combination tabulate     N         N          400     400      0       <NULL>  <NULL> stat_3    
  9 <NA>   <NULL>         <NA>     <NULL>       TRT01A                       C: Combination tabulate     p         %            0.33  33.0     <fn>    <NULL>  <NULL> stat_3    
 10 TRT01A A: Drug X      <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical n         n           86     86       <fn>    <NULL>  <NULL> stat_1    
 11 TRT01A A: Drug X      <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 12 TRT01A A: Drug X      <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical p         %            0.642 64       <fn>    <NULL>  <NULL> stat_1    
 13 TRT01A B: Placebo     <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical n         n           93     93       <fn>    <NULL>  <NULL> stat_2    
 14 TRT01A B: Placebo     <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 15 TRT01A B: Placebo     <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical p         %            0.694 69       <fn>    <NULL>  <NULL> stat_2    
 16 TRT01A C: Combination <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical n         n           90     90       <fn>    <NULL>  <NULL> stat_3    
 17 TRT01A C: Combination <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 18 TRT01A C: Combination <NA>     <NULL>       ..ard_hierarchical_overall.. TRUE           hierarchical p         %            0.682 68       <fn>    <NULL>  <NULL> stat_3    
 19 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical n         n           53     53       <fn>    <NULL>  <NULL> stat_1    
 20 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 21 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical p         %            0.396 40       <fn>    <NULL>  <NULL> stat_1    
 22 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical n         n           55     55       <fn>    <NULL>  <NULL> stat_2    
 23 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 24 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical p         %            0.410 41       <fn>    <NULL>  <NULL> stat_2    
 25 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical n         n           69     69       <fn>    <NULL>  <NULL> stat_3    
 26 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 27 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl A.1         hierarchical p         %            0.523 52       <fn>    <NULL>  <NULL> stat_3    
 28 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical n         n           37     37       <fn>    <NULL>  <NULL> stat_1    
 29 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 30 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical p         %            0.276 28       <fn>    <NULL>  <NULL> stat_1    
 31 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical n         n           37     37       <fn>    <NULL>  <NULL> stat_2    
 32 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 33 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical p         %            0.276 28       <fn>    <NULL>  <NULL> stat_2    
 34 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical n         n           50     50       <fn>    <NULL>  <NULL> stat_3    
 35 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 36 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.1  hierarchical p         %            0.379 38       <fn>    <NULL>  <NULL> stat_3    
 37 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical n         n           33     33       <fn>    <NULL>  <NULL> stat_1    
 38 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 39 TRT01A A: Drug X      AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical p         %            0.246 25       <fn>    <NULL>  <NULL> stat_1    
 40 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical n         n           31     31       <fn>    <NULL>  <NULL> stat_2    
 41 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 42 TRT01A B: Placebo     AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical p         %            0.231 23       <fn>    <NULL>  <NULL> stat_2    
 43 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical n         n           40     40       <fn>    <NULL>  <NULL> stat_3    
 44 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 45 TRT01A C: Combination AEBODSYS cl A.1       AEDECOD                      dcd A.1.1.1.2  hierarchical p         %            0.303 30       <fn>    <NULL>  <NULL> stat_3    
 46 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_1    
 47 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 48 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical p         %            0.261 26       <fn>    <NULL>  <NULL> stat_1    
 49 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical n         n           41     41       <fn>    <NULL>  <NULL> stat_2    
 50 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 51 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical p         %            0.306 31       <fn>    <NULL>  <NULL> stat_2    
 52 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical n         n           36     36       <fn>    <NULL>  <NULL> stat_3    
 53 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 54 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.1         hierarchical p         %            0.273 27       <fn>    <NULL>  <NULL> stat_3    
 55 TRT01A A: Drug X      AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_1    
 56 TRT01A A: Drug X      AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 57 TRT01A A: Drug X      AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical p         %            0.261 26       <fn>    <NULL>  <NULL> stat_1    
 58 TRT01A B: Placebo     AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical n         n           41     41       <fn>    <NULL>  <NULL> stat_2    
 59 TRT01A B: Placebo     AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 60 TRT01A B: Placebo     AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical p         %            0.306 31       <fn>    <NULL>  <NULL> stat_2    
 61 TRT01A C: Combination AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical n         n           36     36       <fn>    <NULL>  <NULL> stat_3    
 62 TRT01A C: Combination AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 63 TRT01A C: Combination AEBODSYS cl B.1       AEDECOD                      dcd B.1.1.1.1  hierarchical p         %            0.273 27       <fn>    <NULL>  <NULL> stat_3    
 64 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical n         n           55     55       <fn>    <NULL>  <NULL> stat_1    
 65 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 66 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical p         %            0.410 41       <fn>    <NULL>  <NULL> stat_1    
 67 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical n         n           56     56       <fn>    <NULL>  <NULL> stat_2    
 68 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 69 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical p         %            0.418 42       <fn>    <NULL>  <NULL> stat_2    
 70 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical n         n           65     65       <fn>    <NULL>  <NULL> stat_3    
 71 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 72 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl B.2         hierarchical p         %            0.492 49       <fn>    <NULL>  <NULL> stat_3    
 73 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical n         n           36     36       <fn>    <NULL>  <NULL> stat_1    
 74 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 75 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical p         %            0.269 27       <fn>    <NULL>  <NULL> stat_1    
 76 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical n         n           33     33       <fn>    <NULL>  <NULL> stat_2    
 77 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 78 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical p         %            0.246 25       <fn>    <NULL>  <NULL> stat_2    
 79 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_3    
 80 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 81 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.1.2.1  hierarchical p         %            0.265 27       <fn>    <NULL>  <NULL> stat_3    
 82 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical n         n           34     34       <fn>    <NULL>  <NULL> stat_1    
 83 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 84 TRT01A A: Drug X      AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical p         %            0.254 25       <fn>    <NULL>  <NULL> stat_1    
 85 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical n         n           41     41       <fn>    <NULL>  <NULL> stat_2    
 86 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 87 TRT01A B: Placebo     AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical p         %            0.306 31       <fn>    <NULL>  <NULL> stat_2    
 88 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical n         n           41     41       <fn>    <NULL>  <NULL> stat_3    
 89 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 90 TRT01A C: Combination AEBODSYS cl B.2       AEDECOD                      dcd B.2.2.3.1  hierarchical p         %            0.311 31       <fn>    <NULL>  <NULL> stat_3    
 91 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical n         n           28     28       <fn>    <NULL>  <NULL> stat_1    
 92 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
 93 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical p         %            0.209 21       <fn>    <NULL>  <NULL> stat_1    
 94 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical n         n           36     36       <fn>    <NULL>  <NULL> stat_2    
 95 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
 96 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical p         %            0.269 27       <fn>    <NULL>  <NULL> stat_2    
 97 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical n         n           32     32       <fn>    <NULL>  <NULL> stat_3    
 98 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
 99 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.1         hierarchical p         %            0.242 24       <fn>    <NULL>  <NULL> stat_3    
100 TRT01A A: Drug X      AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical n         n           28     28       <fn>    <NULL>  <NULL> stat_1    
101 TRT01A A: Drug X      AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
102 TRT01A A: Drug X      AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical p         %            0.209 21       <fn>    <NULL>  <NULL> stat_1    
103 TRT01A B: Placebo     AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical n         n           36     36       <fn>    <NULL>  <NULL> stat_2    
104 TRT01A B: Placebo     AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
105 TRT01A B: Placebo     AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical p         %            0.269 27       <fn>    <NULL>  <NULL> stat_2    
106 TRT01A C: Combination AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical n         n           32     32       <fn>    <NULL>  <NULL> stat_3    
107 TRT01A C: Combination AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
108 TRT01A C: Combination AEBODSYS cl C.1       AEDECOD                      dcd C.1.1.1.3  hierarchical p         %            0.242 24       <fn>    <NULL>  <NULL> stat_3    
109 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical n         n           26     26       <fn>    <NULL>  <NULL> stat_1    
110 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
111 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical p         %            0.194 19       <fn>    <NULL>  <NULL> stat_1    
112 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical n         n           39     39       <fn>    <NULL>  <NULL> stat_2    
113 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
114 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical p         %            0.291 29       <fn>    <NULL>  <NULL> stat_2    
115 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical n         n           43     43       <fn>    <NULL>  <NULL> stat_3    
116 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
117 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl C.2         hierarchical p         %            0.326 33       <fn>    <NULL>  <NULL> stat_3    
118 TRT01A A: Drug X      AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical n         n           26     26       <fn>    <NULL>  <NULL> stat_1    
119 TRT01A A: Drug X      AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
120 TRT01A A: Drug X      AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical p         %            0.194 19       <fn>    <NULL>  <NULL> stat_1    
121 TRT01A B: Placebo     AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical n         n           39     39       <fn>    <NULL>  <NULL> stat_2    
122 TRT01A B: Placebo     AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
123 TRT01A B: Placebo     AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical p         %            0.291 29       <fn>    <NULL>  <NULL> stat_2    
124 TRT01A C: Combination AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical n         n           43     43       <fn>    <NULL>  <NULL> stat_3    
125 TRT01A C: Combination AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
126 TRT01A C: Combination AEBODSYS cl C.2       AEDECOD                      dcd C.2.1.2.1  hierarchical p         %            0.326 33       <fn>    <NULL>  <NULL> stat_3    
127 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical n         n           51     51       <fn>    <NULL>  <NULL> stat_1    
128 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
129 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical p         %            0.381 38       <fn>    <NULL>  <NULL> stat_1    
130 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical n         n           51     51       <fn>    <NULL>  <NULL> stat_2    
131 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
132 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical p         %            0.381 38       <fn>    <NULL>  <NULL> stat_2    
133 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical n         n           60     60       <fn>    <NULL>  <NULL> stat_3    
134 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
135 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.1         hierarchical p         %            0.455 45       <fn>    <NULL>  <NULL> stat_3    
136 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical n         n           29     29       <fn>    <NULL>  <NULL> stat_1    
137 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
138 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical p         %            0.216 22       <fn>    <NULL>  <NULL> stat_1    
139 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical n         n           31     31       <fn>    <NULL>  <NULL> stat_2    
140 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
141 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical p         %            0.231 23       <fn>    <NULL>  <NULL> stat_2    
142 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical n         n           37     37       <fn>    <NULL>  <NULL> stat_3    
143 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
144 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.1.1  hierarchical p         %            0.280 28       <fn>    <NULL>  <NULL> stat_3    
145 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical n         n           33     33       <fn>    <NULL>  <NULL> stat_1    
146 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
147 TRT01A A: Drug X      AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical p         %            0.246 25       <fn>    <NULL>  <NULL> stat_1    
148 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical n         n           34     34       <fn>    <NULL>  <NULL> stat_2    
149 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
150 TRT01A B: Placebo     AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical p         %            0.254 25       <fn>    <NULL>  <NULL> stat_2    
151 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical n         n           39     39       <fn>    <NULL>  <NULL> stat_3    
152 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
153 TRT01A C: Combination AEBODSYS cl D.1       AEDECOD                      dcd D.1.1.4.2  hierarchical p         %            0.295 30       <fn>    <NULL>  <NULL> stat_3    
154 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_1    
155 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
156 TRT01A A: Drug X      <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical p         %            0.261 26       <fn>    <NULL>  <NULL> stat_1    
157 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical n         n           46     46       <fn>    <NULL>  <NULL> stat_2    
158 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
159 TRT01A B: Placebo     <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical p         %            0.343 34       <fn>    <NULL>  <NULL> stat_2    
160 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical n         n           44     44       <fn>    <NULL>  <NULL> stat_3    
161 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
162 TRT01A C: Combination <NA>     <NULL>       AEBODSYS                     cl D.2         hierarchical p         %            0.333 33       <fn>    <NULL>  <NULL> stat_3    
163 TRT01A A: Drug X      AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical n         n           35     35       <fn>    <NULL>  <NULL> stat_1    
164 TRT01A A: Drug X      AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_1    
165 TRT01A A: Drug X      AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical p         %            0.261 26       <fn>    <NULL>  <NULL> stat_1    
166 TRT01A B: Placebo     AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical n         n           46     46       <fn>    <NULL>  <NULL> stat_2    
167 TRT01A B: Placebo     AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical N         N          134     134      <fn>    <NULL>  <NULL> stat_2    
168 TRT01A B: Placebo     AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical p         %            0.343 34       <fn>    <NULL>  <NULL> stat_2    
169 TRT01A C: Combination AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical n         n           44     44       <fn>    <NULL>  <NULL> stat_3    
170 TRT01A C: Combination AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical N         N          132     132      <fn>    <NULL>  <NULL> stat_3    
171 TRT01A C: Combination AEBODSYS cl D.2       AEDECOD                      dcd D.2.1.5.3  hierarchical p         %            0.333 33       <fn>    <NULL>  <NULL> stat_3    
Source Code
---
title: Subjects With Adverse Events Leading to Treatment Discontinuation by System Organ Class and Preferred Term, Safety Population, Pooled Analysis (or Trial X) 
subtitle: FDA Table 12
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**

[N/A (per FDA IG)](https://www.fda.gov/media/187065/download)

**Customization**

[N/A (per FDA IG)](https://www.fda.gov/media/187065/download)

::::

:::: {.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_12.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