Code
split_fun <- drop_split_levels
lyt <- basic_table(show_colcounts = TRUE) %>%
split_cols_by("ACTARM") %>%
analyze_num_patients(
vars = "USUBJID",
.stats = c("unique", "nonunique"),
.labels = c(
unique = "Total number of patients with at least one major protocol deviation",
nonunique = "Total number of major protocol deviations"
)
) %>%
split_rows_by(
"DVDECOD",
split_fun = split_fun,
label_pos = "topleft",
split_label = obj_label(addv$DVDECOD)
) %>%
count_occurrences(vars = "DVTERM") %>%
append_varlabels(addv, "DVTERM", indent = 1L)
result <- build_table(lyt = lyt, df = addv, alt_counts_df = adsl) %>%
prune_table() %>%
sort_at_path(path = c("DVDECOD", "*", "DVTERM"), scorefun = score_occurrences)
result
Category A: Drug X B: Placebo C: Combination
Description (N=134) (N=134) (N=132)
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
Total number of patients with at least one major protocol deviation 28 (20.9%) 22 (16.4%) 18 (13.6%)
Total number of major protocol deviations 49 35 35
EXCLUSION CRITERIA
Active or untreated or other excluded cns metastases 2 (1.5%) 4 (3.0%) 1 (0.8%)
Pregnancy criteria 3 (2.2%) 3 (2.2%) 1 (0.8%)
History of other malignancies within the last 5 years 3 (2.2%) 1 (0.7%) 1 (0.8%)
Uncontrolled concurrent condition 2 (1.5%) 0 3 (2.3%)
Other exclusion criteria 1 (0.7%) 0 2 (1.5%)
Received prior prohibited therapy or medication 2 (1.5%) 1 (0.7%) 0
INCLUSION CRITERIA
No signed ICF at study entry 5 (3.7%) 0 6 (4.5%)
Ineligible cancer type or current cancer stage 3 (2.2%) 2 (1.5%) 4 (3.0%)
Inclusion lab values outside allowed limits 4 (3.0%) 1 (0.7%) 0
Does not meet prior therapy requirements 2 (1.5%) 1 (0.7%) 1 (0.8%)
Inclusion-related test not done/out of window 1 (0.7%) 1 (0.7%) 0
MEDICATION
Discontinued study drug for unspecified reason 3 (2.2%) 2 (1.5%) 1 (0.8%)
Significant deviation from planned dose 3 (2.2%) 1 (0.7%) 2 (1.5%)
Received incorrect study medication 0 3 (2.2%) 1 (0.8%)
Received prohibited concomitant medication 1 (0.7%) 2 (1.5%) 1 (0.8%)
Dose missed or significantly out of window 2 (1.5%) 0 1 (0.8%)
PROCEDURAL
Eligibility-related test not done/out of window 2 (1.5%) 4 (3.0%) 3 (2.3%)
Omission of screening tumor assessment 4 (3.0%) 1 (0.7%) 3 (2.3%)
Missed assessment affecting safety/study outcomes 2 (1.5%) 3 (2.2%) 1 (0.8%)
Failure to sign updated ICF within two visits 2 (1.5%) 1 (0.7%) 1 (0.8%)
Missed 2 or more efficacy assessments 1 (0.7%) 2 (1.5%) 0
Omission of complete lab panel required by protocol 0 0 1 (0.8%)