A: Drug X B: Placebo C: Combination All Patients
Status (N=134) (N=134) (N=132) (N=400)
————————————————————————————————————————————————————————————————————————————————————————
Started Study 134 (100.00%) 134 (100.00%) 132 (100.00%) 400 (100.00%)
Completed Study 65 (48.51%) 67 (50.00%) 69 (52.27%) 201 (50.25%)
Discontinued Study 15 (11.2%) 28 (20.9%) 24 (18.2%) 67 (16.8%)
Death 6 (40%) 5 (17.9%) 4 (16.7%) 15 (22.4%)
Lost To Follow-Up 1 (6.7%) 3 (10.7%) 8 (33.3%) 12 (17.9%)
Other 2 (13.3%) 6 (21.4%) 5 (20.8%) 13 (19.4%)
Protocol Violation 4 (26.7%) 4 (14.3%) 4 (16.7%) 12 (17.9%)
Withdrawal By Subject 2 (13.3%) 10 (35.7%) 3 (12.5%) 15 (22.4%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
Data Setup
Code
library(tern)library(dplyr)adsl <- random.cdisc.data::cadsl# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adsl <-df_explicit_na(adsl)# Change description in variable SEX.adsl <- adsl %>%mutate(SEX =factor(case_when( SEX =="M"~"Male", SEX =="F"~"Female", SEX =="U"~"Unknown", SEX =="UNDIFFERENTIATED"~"Undifferentiated" )),AGEGRP =factor(case_when(between(AGE, 18, 40) ~"18-40",between(AGE, 41, 64) ~"41-64", AGE >64~">=65" ),levels =c("18-40", "41-64", ">=65") ) )
A: Drug X B: Placebo C: Combination All Patients
(N=134) (N=134) (N=132) (N=400)
———————————————————————————————————————————————————————————————————————————————————————————————————————
Age (yr)
n 134 134 132 400
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) 34.9 (7.4)
Median 33.0 35.0 35.0 34.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 20.0 - 69.0
Age group
n 134 134 132 400
18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) 322 (80.5%)
41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) 77 (19.2%)
>=65 0 0 1 (0.8%) 1 (0.2%)
Sex
n 134 134 132 400
Female 79 (59%) 82 (61.2%) 70 (53%) 231 (57.8%)
Male 55 (41%) 52 (38.8%) 62 (47%) 169 (42.2%)
Race
n 134 134 132 400
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) 208 (52%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) 91 (22.8%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) 74 (18.5%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) 25 (6.2%)
MULTIPLE 0 1 (0.7%) 0 1 (0.2%)
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 1 (0.2%)
OTHER 0 0 0 0
UNKNOWN 0 0 0 0
Ethnicity
n 134 134 132 400
HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) 48 (12%)
NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) 308 (77%)
NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%)
UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
Data Setup
Code
library(tern)library(dplyr)adsl <- random.cdisc.data::cadsladsl_labels <-var_labels(adsl)# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adsl <-df_explicit_na(adsl)adsl <- adsl %>%mutate(COUNTRY =droplevels(COUNTRY)) %>%arrange(REGION1, COUNTRY)var_labels(adsl) <-c(adsl_labels)
A: Drug X B: Placebo C: Combination All Patients
Country (N=134) (N=134) (N=132) (N=400)
—————————————————————————————————————————————————————————————————
n 134 134 132 400
CHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%)
USA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10%)
BRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%)
PAK 12 (9%) 9 (6.7%) 10 (7.6%) 31 (7.8%)
NGA 8 (6%) 7 (5.2%) 11 (8.3%) 26 (6.5%)
RUS 5 (3.7%) 8 (6%) 6 (4.5%) 19 (4.8%)
JPN 5 (3.7%) 4 (3%) 9 (6.8%) 18 (4.5%)
GBR 4 (3%) 3 (2.2%) 2 (1.5%) 9 (2.2%)
CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
Data Setup
Trimming function get_adae_trimmed is defined to filter AEs with greater than 5% incidence rate.
# Define the split functionsplit_fun <- drop_split_levelslyt <-basic_table() %>%split_cols_by("ARM") %>%summarize_patients_events_in_cols(custom_label ="Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5%" ) %>%split_rows_by("AEBODSYS",nested =FALSE,split_fun = split_fun,indent_mod =-1L,label_pos ="topleft",split_label =obj_label(adae_trim$AEBODSYS) ) %>%split_rows_by("AEDECOD", split_fun = split_fun, label_pos ="topleft", split_label =obj_label(adae_trim$AEDECOD)) %>%summarize_patients_events_in_cols(col_split =FALSE )result <-build_table(lyt, adae_trim)result
Body System or Organ Class A: Drug X B: Placebo C: Combination
Dictionary-Derived Term Patients (All) Events (All) Patients (All) Events (All) Patients (All) Events (All)
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% 106 360 112 367 112 421
cl A.1
dcd A.1.1.1.1 50 64 45 62 63 88
cl B.2
dcd B.2.1.2.1 49 65 44 62 52 66
cl C.1
dcd C.1.1.1.3 43 55 46 63 43 64
cl C.2
dcd C.2.1.2.1 35 48 48 53 55 65
cl D.1
dcd D.1.1.4.2 48 66 42 55 50 64
cl D.2
dcd D.2.1.5.3 47 62 58 72 57 74
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
For illustrative purposes, the adae data is filtered by arm “A: Drug X” here.
Data Setup
Code
library(tern)library(dplyr)adae <- random.cdisc.data::cadae# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adae <-df_explicit_na(adae)adae_serious <- adae %>%filter(AESER =="Y", SAFFL =="Y")adae_serious_arm <- adae_serious %>%filter(ARM =="A: Drug X")filters_list <-list(related =with_label(c(AEREL ="Y"), "Events (Related)"),fatal =with_label(c(AESDTH ="Y"), "Events (Fatal)"),fatal_related =with_label(c(AEREL ="Y", AESDTH ="Y"), "Events (Fatal & Related)"))
Serious Adverse Events, Fatal SAEs and SAEs Related to Study Medication, by Treatment Group
# Define the split functionsplit_fun <- drop_split_levelslyt <-basic_table() %>%summarize_patients_events_in_cols(filters_list = filters_list,empty_stats =c("all", "related", "fatal", "fatal_related"),custom_label ="Total number of patients with at least one serious adverse event" ) %>%split_rows_by("AEBODSYS",nested =FALSE,split_fun = split_fun,indent_mod =-1L,label_pos ="topleft",split_label =obj_label(adae_trim$AEBODSYS) ) %>%split_rows_by("AEDECOD",split_fun = split_fun,label_pos ="topleft",split_label =obj_label(adae_serious_arm$AEDECOD) ) %>%summarize_patients_events_in_cols(filters_list = filters_list,col_split =FALSE )result <-build_table(lyt, adae_serious_arm)result
Dictionary-Derived Term Patients (All) Events (All) Events (Related) Events (Fatal) Events (Fatal & Related)
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Total number of patients with at least one serious adverse event 104
cl A.1
dcd A.1.1.1.2 48 68 0 0 0
cl B.1
dcd B.1.1.1.1 47 56 56 56 56
cl B.2
dcd B.2.2.3.1 48 64 0 0 0
cl D.1
dcd D.1.1.1.1 50 61 61 61 61
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
A: Drug X B: Placebo C: Combination All Patients
(N=134) (N=134) (N=132) (N=400)
——————————————————————————————————————————————————————————————————————————————————
Total Number of Deaths 76 (62.30%) 70 (56.91%) 75 (62.50%) 221 (60.55%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.