A: Drug X B: Placebo C: Combination Risk Difference (%) (95% CI)
AESI Assessment (N=134) (N=134) (N=132) (N=268)
————————————————————————————————————————————————————————————————————————————————————————————————————————
AE grouping related to AESI 107 (79.9%) 112 (83.6%) 113 (85.6%) 3.7 (-5.5 - 13.0)
dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) -3.7 (-15.2 - 7.7)
dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 0.0 (-11.5 - 11.5)
dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) -6.0 (-17.3 - 5.4)
dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) -4.5 (-15.8 - 6.8)
dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 8.2 (-3.4 - 19.9)
Maximum severity
MILD 16 (11.9%) 19 (14.2%) 17 (12.9%) 2.2 (-5.8 - 10.3)
MODERATE 41 (30.6%) 51 (38.1%) 45 (34.1%) 7.5 (-3.9 - 18.8)
SEVERE 50 (37.3%) 42 (31.3%) 51 (38.6%) -6.0 (-17.3 - 5.4)
Serious 75 (56.0%) 77 (57.5%) 83 (62.9%) 1.5 (-10.4 - 13.4)
Deaths 50 (37.3%) 42 (31.3%) 51 (38.6%) -6.0 (-17.3 - 5.4)
Resulting in discontinuation 35 (26.1%) 34 (25.4%) 33 (25.0%) -0.7 (-11.2 - 9.7)
Relatedness 74 (55.2%) 74 (55.2%) 84 (63.6%) 0.0 (-11.9 - 11.9)
Laboratory Assessment 89 (66.4%) 86 (64.2%) 90 (68.2%) -2.2 (-13.6 - 9.2)
FDA Table 20
Adverse Events of Special Interest Assessment, Safety Population, Pooled Analysis (or Trial X)
# Load Libraries & Data
library(cardinal)
adsl <- random.cdisc.data::cadsl
adae <- random.cdisc.data::cadae
# Pre-Processing - Add/create any required variables in adae
set.seed(1)
adae$AESIFL <- ifelse(adae$AESOC %in% c("cl A", "cl D"), "Y", "N")
adae$AELABFL <- sample(c("Y", "N"), nrow(adae), replace = TRUE)
# Select Preferred Term Variable
pref_var <- "AEDECOD"
# Output Table
risk_diff <- list(arm_x = "B: Placebo", arm_y = "A: Drug X") # optional
make_table_20(
adae = adae, alt_counts_df = adsl, pref_var = pref_var, aesifl_var = "AESIFL",
aelabfl_var = "AELABFL", risk_diff = risk_diff
)
make_table_20()
Required variables:
-
adae
:USUBJID
,AESEV
,AESER
,AESDTH
,EOSSTT
,AEREL
, and the variables specified bypref_var
,aesifl_var
,aelabfl_var
,arm_var
, andsaffl_var
. -
alt_counts_df
(if specified):USUBJID
and the variables specified byarm_var
andsaffl_var
.
Argument | Description | Default |
adae |
(data.frame ) Dataset (typically ADAE) required to build table. |
No default |
alt_counts_df |
(character ) Alternative dataset (typically ADSL) used only to calculate column counts. |
NULL |
show_colcounts |
(flag ) Whether column counts should be printed. |
TRUE |
arm_var |
(character ) Arm variable used to split table into columns. |
"ARM" |
saffl_var |
(character ) Flag variable used to indicate inclusion in safety population. |
"SAFFL" |
pref_var |
(character ) Preferred term variable from adae to include in the table. |
"AEDECOD" |
aesifl_var |
(character ) Variable from adae that indicates adverse events of special interest. |
"AESIFL" |
aelabfl_var |
(character ) Variable from adae that indicates a laboratory assessment. |
"AELABFL" |
lbl_overall |
(character ) If specified, an overall column will be added to the table with the given value as the column label. |
NULL |
risk_diff |
(named
|
NULL |
prune_0 |
(flag ) Whether all-zero rows should be removed from the table. |
TRUE |
annotations |
(named list of character ) List of annotations to add to the table. Valid annotation types are title , subtitles , main_footer , and prov_footer. Each name-value pair should use the annotation type as name and the desired string as value. |
NULL |
Source code for this function is available here.