A: Drug X B: Placebo C: Combination Risk Difference (%) (95% CI)
(N=134) (N=134) (N=132) (N=268)
—————————————————————————————————————————————————————————————————————————————————————————————————
Patients randomized 65 (48.5%) 54 (40.3%) 59 (44.7%) -8.2 (-20.1 - 3.6)
ITT/mITT population 134 (100%) 134 (100%) 132 (100%) 0.0 (0.0 - 0.0)
Safety population 134 (100%) 134 (100%) 132 (100%) 0.0 (0.0 - 0.0)
Per-protocol population 65 (48.5%) 54 (40.3%) 59 (44.7%) -8.2 (-20.1 - 3.6)
Discontinued study drug 42 (31.3%) 40 (29.9%) 38 (28.8%) -1.5 (-12.5 - 9.5)
Adverse event 3 (2.2%) 6 (4.5%) 5 (3.8%) 2.2 (-2.1 - 6.5)
Lack of efficacy 2 (1.5%) 2 (1.5%) 3 (2.3%) 0.0 (-2.9 - 2.9)
Protocol deviation 0 0 0 0.0 (0.0 - 0.0)
Death 25 (18.7%) 23 (17.2%) 22 (16.7%) -1.5 (-10.7 - 7.7)
Withdrawal by subject 0 0 0 0.0 (0.0 - 0.0)
Other 3 (2.2%) 4 (3.0%) 3 (2.3%) 0.7 (-3.1 - 4.6)
Discontinued study 42 (31.3%) 40 (29.9%) 38 (28.8%) -1.5 (-12.5 - 9.5)
Death 25 (18.7%) 23 (17.2%) 22 (16.7%) -1.5 (-10.7 - 7.7)
Lost to follow-up 0 0 0 0.0 (0.0 - 0.0)
Withdrawal by subject 0 0 0 0.0 (0.0 - 0.0)
Physician decision 0 0 0 0.0 (0.0 - 0.0)
Protocol deviation 5 (3.7%) 3 (2.2%) 4 (3.0%) -1.5 (-5.6 - 2.6)
Other 3 (2.2%) 4 (3.0%) 3 (2.3%) 0.7 (-3.1 - 4.6)
FDA Table 4
Patient Disposition, Pooled Analyses
# Load Libraries & Data
library(cardinal)
library(dplyr)
adsl <- random.cdisc.data::cadsl %>%
mutate(test = rbinom(400, 1, 0.5)) %>%
mutate(
RANDFL = ifelse(test == 0, "N", "Y"),
PPROTFL = ifelse(test == 0, "N", "Y"),
DCSREAS = if_else(DCSREAS %in% c(
"ADVERSE EVENT", "LACK OF EFFICACY", "PROTOCOL VIOLATION",
"DEATH", "WITHDRAWAL BY PARENT/GUARDIAN"
), DCSREAS, "OTHER")
)
# Output Table
risk_diff <- list(arm_x = "B: Placebo", arm_y = "A: Drug X") # optional
tbl <- make_table_04(
df = adsl, pop_vars = c("RANDFL", "ITTFL", "SAFFL", "PPROTFL"),
lbl_pop_vars = c("Patients randomized", "ITT/mITT population", "Safety population", "Per-protocol population"),
risk_diff = risk_diff
)
tbl
make_table_04()
Required variables:
df
:USUBJID
,EOTSTT
,DCSREAS
,EOSSTT
,DCSREAS
and the variables specified byarm_var
andpop_var
.alt_counts_df
(if specified):USUBJID
, and the variable specified byarm_var
andpop_var
.
Argument | Description | Default |
---|---|---|
df |
(data.frame ) Dataset (typically ADSL) required to build table. |
No default |
alt_counts_df |
(character ) Alternative dataset used only to calculate column counts. |
NULL |
arm_var |
(character ) Arm variable used to split table into columns. |
"ARM" |
pop_vars |
(named list of character ) List of Population variables to use in Table |
c("SAFFL") |
lbl_pop_vars |
(named list of character ) List of row labels for populations defined by pop_vars
|
c("Safety population") |
lbl_overall |
(character ) If specified, an overall column will be added to the table with the given value as the column label. |
NULL |
prune_0 |
(flag ) Whether all-zero rows should be removed from the table. |
FALSE |
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.