We prepare the data similarly as in SFG1. In particular we use again the cut_quantile_bins() function, here to obtain quartile bins of the continuous biomarker BMRKR1.
---title: SFG2Asubtitle: Survival Forest Graph for Overall Population and by Percentiles of Continuous Biomarker with "Less than Percentage" Cutoffs Biomarkercategories: [SFG]---------------------------------------------------------------------------::: panel-tabset{{< include setup.qmd >}}## PlotWith a different `groups_lists` definition we can also tabulate statistics for the "below than cutoff" grouped bins.```{r}BMRKR1_BIN_levels <-levels(adtte$BMRKR1_BIN)tbl <-extract_survival_subgroups(variables =list(tte ="AVAL",is_event ="is_event",arm ="ARM_BIN",subgroups =c("BEP01FL", "BMRKR1_BIN") ),label_all ="ITT",groups_lists =list(BMRKR1_BIN =list("[0%,25%]"= BMRKR1_BIN_levels[1],"[0%,50%]"= BMRKR1_BIN_levels[1:2],"[0%,75%]"= BMRKR1_BIN_levels[1:3] ) ),data = adtte)result <-basic_table() %>%tabulate_survival_subgroups(df = tbl,vars =c("n_tot_events", "n", "n_events", "median", "hr", "ci"),time_unit = adtte$AVALU[1] )```We can now produce the forest plot using the `g_forest()` function.```{r, fig.width = 15}g_forest(result)```{{< include ../../misc/session_info.qmd >}}:::