A setup similar to KG1 is used, with some additional data manipulation steps to first binarize the continuous biomarker and the treatment arm variables, and then combine both into a new interaction variable ARM_BMRKR2. Since we are using biomarker information, we filter on the biomarker evaluable population using the flag variable BEP01FL.
---title: KG4subtitle: Kaplan-Meier Graphs by Treatment Arm and Biomarker Subgroupscategories: [KG]---------------------------------------------------------------------------::: panel-tabset{{< include setup.qmd >}}## PlotWe can produce the basic graph using the `g_km()` function from `tern`.```{r, fig.width=9, fig.height=6}g_km( df = adtte, variables = variables, annot_surv_med = FALSE, col = c("red", "blue", "red", "blue"), lty = c(1, 1, 2, 2))```We can also choose to annotate the plot with the median survival time for each of the treatment arms using the `annot_surv_med = TRUE` option.```{r, fig.width=9, fig.height=6}g_km( df = adtte, variables = variables, annot_surv_med = TRUE, col = c("red", "blue", "red", "blue"), lty = c(1, 1, 2, 2))```{{< include ../../misc/session_info.qmd >}}:::