ARM A ARM B ARM C
(N=134) (N=134) (N=132)
———————————————————————————————————————————————————————————————————————————————————————
Patients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%)
Patients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%)
Time to 1st LLT Event (DAYS)
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
Unstratified Analysis
p-value (log-rank) 0.5013 0.6413
Hazard Ratio 1.27 0.84
95% CI (0.63, 2.56) (0.40, 1.75)
———————————————————————————————————————————————————————————————————————————————————————
{1} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————
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.
ARM A ARM B ARM C
(N=134) (N=134) (N=132)
———————————————————————————————————————————————————————————————————————————————————————
Patients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%)
Patients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%)
Time to 1st LLT Event (DAYS)
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
———————————————————————————————————————————————————————————————————————————————————————
{1} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————
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.
ARM A ARM B ARM C
(N=134) (N=134) (N=132)
———————————————————————————————————————————————————————————————————————————————————————
Patients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%)
Patients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%)
Time to 1st LLT Event (DAYS)
Median NA NA 721.0
95% CI NA (681.0, NA) (691.0, NA)
25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA
Range 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}
Unstratified Analysis
p-value (log-rank) 0.5013 0.6413
Hazard Ratio 1.27 0.84
95% CI (0.63, 2.56) (0.40, 1.75)
Stratified By: RACE, SEX
p-value (log-rank) 0.3886 0.7970
Hazard Ratio 1.39 0.91
95% CI (0.65, 2.97) (0.43, 1.93)
———————————————————————————————————————————————————————————————————————————————————————
{1} - Censored observations: range minimum & maximum
———————————————————————————————————————————————————————————————————————————————————————
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.
Code
library(tern)library(dplyr)adsl <- random.cdisc.data::cadsladaette <- random.cdisc.data::cadaette# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adsl <-df_explicit_na(adsl)adaette <-df_explicit_na(adaette)adsl_safl <- dplyr::filter(adsl, .data$SAFFL =="Y")anl <- adaette %>% dplyr::filter( SAFFL =="Y", PARAMCD =="HYSTTEBL" ) %>% dplyr::mutate(AVAL = .data$AVAL * dplyr::case_when( # convert to days, if possible .data$AVALU =="WEEKS"~7, .data$AVALU =="MONTHS"~30.4375, .data$AVALU =="YEARS"~365,TRUE~1 ),AVALU =factor(dplyr::case_when( .data$AVALU %in%c("WEEKS", "MONTHS", "YEARS") ~factor("DAYS"),TRUE~ .data$AVALU ), levels ="DAYS"),is_event = CNSR ==0, # this will be a LLT eventevent_grp =factor( dplyr::case_when( CNSR ==0~"Patients with LLT event (%)", CNSR ==1~"Patients without LLT event (%)" ),levels =c("Patients with LLT event (%)","Patients without LLT event (%)" ) ) )
library(teal.modules.clinical)## Data reproducible codedata <-teal_data()data <-within(data, {library(dplyr) ADSL <- random.cdisc.data::cadsl ADAETTE <- random.cdisc.data::cadaette# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <-df_explicit_na(ADSL) ADAETTE <-df_explicit_na(ADAETTE) ADSL <-filter(ADSL, .data$SAFFL =="Y") ADAETTE <-filter(ADAETTE, .data$SAFFL =="Y")})datanames <-c("ADSL", "ADAETTE")datanames(data) <- datanamesjoin_keys(data) <- default_cdisc_join_keys[datanames]## Reusable Configuration For ModulesADSL <- data[["ADSL"]]ADAETTE <- data[["ADAETTE"]]arm_ref_comp <-list(ACTARMCD =list(ref ="ARM B",comp =c("ARM A", "ARM C") ),ARM =list(ref ="B: Placebo",comp =c("A: Drug X", "C: Combination") ))## Setup Appapp <-init(data = data,modules =modules(tm_t_tte(label ="Time To LLT Event Table",dataname ="ADAETTE",arm_var =choices_selected(variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")),"ARM" ),arm_ref_comp = arm_ref_comp,paramcd =choices_selected(value_choices(ADAETTE, "PARAMCD", "PARAM"),"HYSTTEBL" ),strata_var =choices_selected(variable_choices(ADSL, c("RACE", "SEX")),c("RACE", "SEX") ),time_points =choices_selected(0, NULL),event_desc_var =choices_selected("EVNTDESC", "EVNTDESC", fixed =TRUE) ) ))shinyApp(app$ui, app$server)
Experimental use!
shinylive allow you to modify to run shiny application entirely in the web browser. Modify the code below and click re-run the app to see the results. The performance is slighly worse and some of the features (e.g. downloading) might not work at all.
#| '!! shinylive warning !!': |#| shinylive does not work in self-contained HTML documents.#| Please set `embed-resources: false` in your metadata.#| standalone: true#| viewerHeight: 800#| editorHeight: 200#| components: [viewer, editor]#| layout: vertical# -- WEBR HELPERS --options(webr_pkg_repos = c("r-universe" = "https://insightsengineering.r-universe.dev", getOption("webr_pkg_repos")))# -- APP CODE --library(teal.modules.clinical)## Data reproducible codedata <- teal_data()data <- within(data, { library(dplyr) ADSL <- random.cdisc.data::cadsl ADAETTE <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) ADAETTE <- df_explicit_na(ADAETTE) ADSL <- filter(ADSL, .data$SAFFL == "Y") ADAETTE <- filter(ADAETTE, .data$SAFFL == "Y")})datanames <- c("ADSL", "ADAETTE")datanames(data) <- datanamesjoin_keys(data) <- default_cdisc_join_keys[datanames]## Reusable Configuration For ModulesADSL <- data[["ADSL"]]ADAETTE <- data[["ADAETTE"]]arm_ref_comp <- list( ACTARMCD = list( ref = "ARM B", comp = c("ARM A", "ARM C") ), ARM = list( ref = "B: Placebo", comp = c("A: Drug X", "C: Combination") ))## Setup Appapp <- init( data = data, modules = modules( tm_t_tte( label = "Time To LLT Event Table", dataname = "ADAETTE", arm_var = choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), arm_ref_comp = arm_ref_comp, paramcd = choices_selected( value_choices(ADAETTE, "PARAMCD", "PARAM"), "HYSTTEBL" ), strata_var = choices_selected( variable_choices(ADSL, c("RACE", "SEX")), c("RACE", "SEX") ), time_points = choices_selected(0, NULL), event_desc_var = choices_selected("EVNTDESC", "EVNTDESC", fixed = TRUE) ) ))shinyApp(app$ui, app$server)