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.
We can customize the color and line type used in the graph with the col and lty arguments of g_km(). We can first check the level order of the ARM_BMRKR2 factor variable to know which color and line type order we need.
---title: KG4Asubtitle: Change Color and Line Type in Kaplan-Meier Graph by Treatment Arm and Biomarker Subgroupscategories: [KG]---------------------------------------------------------------------------::: panel-tabset{{< include setup.qmd >}}## PlotWe can customize the color and line type used in the graph with the `col` and `lty` arguments of `g_km()`.We can first check the level order of the `ARM_BMRKR2` factor variable to know which color and line type order we need.```{r, fig.width=9, fig.height=6}levels(adtte$ARM_BMRKR2)g_km( df = adtte, variables = variables, annot_surv_med = TRUE, col = c("green", "orange", "green", "orange"), lty = c(5, 5, 3, 3))```{{< include ../../misc/session_info.qmd >}}:::