Body System or Organ Class
FMQ (Narrow) A: Drug X B: Placebo C: Combination Risk Difference (%) (95% CI)
Dictionary-Derived Term (N=134) (N=134) (N=132) (N=268)
—————————————————————————————————————————————————————————————————————————————————————————————————————
cl A.1
FMQ1 17 (12.7%) 14 (10.4%) 29 (22.0%) -2.2 (-9.9 - 5.4)
dcd A.1.1.1.1 7 (5.2%) 6 (4.5%) 13 (9.8%) -0.7 (-5.9 - 4.4)
dcd A.1.1.1.2 12 (9.0%) 8 (6.0%) 18 (13.6%) -3.0 (-9.3 - 3.3)
FMQ2 23 (17.2%) 20 (14.9%) 20 (15.2%) -2.2 (-11.0 - 6.5)
dcd A.1.1.1.1 13 (9.7%) 10 (7.5%) 12 (9.1%) -2.2 (-8.9 - 4.5)
dcd A.1.1.1.2 12 (9.0%) 10 (7.5%) 8 (6.1%) -1.5 (-8.1 - 5.1)
FMQ3 20 (14.9%) 19 (14.2%) 23 (17.4%) -0.7 (-9.2 - 7.7)
dcd A.1.1.1.1 8 (6.0%) 8 (6.0%) 13 (9.8%) 0.0 (-5.7 - 5.7)
dcd A.1.1.1.2 13 (9.7%) 11 (8.2%) 11 (8.3%) -1.5 (-8.3 - 5.3)
cl B.1
FMQ1 8 (6.0%) 11 (8.2%) 7 (5.3%) 2.2 (-3.9 - 8.4)
dcd B.1.1.1.1 8 (6.0%) 11 (8.2%) 7 (5.3%) 2.2 (-3.9 - 8.4)
FMQ2 5 (3.7%) 12 (9.0%) 16 (12.1%) 5.2 (-0.6 - 11.0)
dcd B.1.1.1.1 5 (3.7%) 12 (9.0%) 16 (12.1%) 5.2 (-0.6 - 11.0)
FMQ3 10 (7.5%) 7 (5.2%) 5 (3.8%) -2.2 (-8.1 - 3.6)
dcd B.1.1.1.1 10 (7.5%) 7 (5.2%) 5 (3.8%) -2.2 (-8.1 - 3.6)
cl B.2
FMQ1 13 (9.7%) 15 (11.2%) 9 (6.8%) 1.5 (-5.8 - 8.8)
dcd B.2.1.2.1 13 (9.7%) 15 (11.2%) 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4.5%) 11 (8.2%) 9 (6.8%) 3.7 (-2.1 - 9.6)
cl D.2
FMQ1 8 (6.0%) 11 (8.2%) 9 (6.8%) 2.2 (-3.9 - 8.4)
dcd D.2.1.5.3 8 (6.0%) 11 (8.2%) 9 (6.8%) 2.2 (-3.9 - 8.4)
FMQ2 14 (10.4%) 15 (11.2%) 14 (10.6%) 0.7 (-6.7 - 8.2)
dcd D.2.1.5.3 14 (10.4%) 15 (11.2%) 14 (10.6%) 0.7 (-6.7 - 8.2)
FMQ3 11 (8.2%) 9 (6.7%) 11 (8.3%) -1.5 (-7.8 - 4.8)
dcd D.2.1.5.3 11 (8.2%) 9 (6.7%) 11 (8.3%) -1.5 (-7.8 - 4.8)
FDA Table 34
Patients With Serious Adverse Events by System Organ Class, FDA Medical Query (Narrow), and Preferred Term, Safety Population, Pooled Analysis (or Trial X)
# Load Libraries & Data
library(dplyr)
library(cardinal)
adsl <- random.cdisc.data::cadsl
adae <- random.cdisc.data::cadae
# Pre-Processing - Ensure required variables fmqsc_var and fmqnam_var exist in adae
set.seed(1)
adae <- adae %>%
rename(FMQ01SC = SMQ01SC) %>%
mutate(
AESER = sample(c("Y", "N"), size = nrow(adae), replace = TRUE),
FMQ01NAM = sample(c("FMQ1", "FMQ2", "FMQ3"), size = nrow(adae), replace = TRUE)
)
adae$FMQ01SC[is.na(adae$FMQ01SC)] <- "NARROW"
# Select Preferred Term Variable
pref_var <- "AEDECOD"
# Output Table
risk_diff <- list(arm_x = "B: Placebo", arm_y = "A: Drug X") # optional
make_table_34(adae = adae, alt_counts_df = adsl, pref_var = pref_var, risk_diff = risk_diff)
make_table_34()
Required variables:
-
adae
:USUBJID
,AEBODSYS
,AESER
, and the variables specified byarm_var
,saffl_var
,trtemfl_var
,fmqsc_var
, andfmqnam_var
, andpref_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 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" |
trtemfl_var |
(character ) Flag variable used to identify Treatment-emergent AE. |
"TRTEMFL" |
fmqsc_var |
(character ) FMQ scope variable to use in table. |
"FMQ01SC" |
fmqnam_var |
(character ) FMQ reference name variable to use in table. |
"FMQ01NAM" |
fmq_scope |
(character ) FMQ scope, can be ‘“NARROW”’ or ‘“BROAD”’. |
"NARROW" |
pref_var |
(character ) Preferred term variable from adae to include in the table. |
"AEDECOD" |
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 |
na_level |
(character ) String to represent missing values. |
"<Missing>" |
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.