A setup similar to KG4 is used. The difference here is that we create the initial binary biomarker variable BMRKR1_BIN from comparing the continuous biomarker variable BMRKR1 with a cutoff of interest.
---title: KG5subtitle: Kaplan-Meier Graphs by Treatment Arm and Continuous Biomarker Cutcategories: [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 >}}:::