KM plot with treatment effect per biomarker subgroup
wrapper_KM_plot_treatment.Rd
KM plot with treatment effect per biomarker subgroup
Usage
wrapper_KM_plot_treatment(
data,
tte_var,
censor_var,
treatment_var,
biomarker_var = NULL,
strat2_var = NULL,
colors = NULL,
palette = NULL,
linetypes = 1,
variable_names = NULL,
title = TRUE,
xlab = TRUE,
strat1_label_both = TRUE,
strat2_label_both = TRUE,
legend_colors_title = TRUE,
legend_position = c(0.03, 0.03),
legend_justification = c(0, 0),
break_time_by = NULL,
max_tte = NULL,
risk_table = TRUE,
conf_int = FALSE,
surv_median_line = "none",
ggtheme = ggplot2::theme_get(),
line_size = 1,
title_size = NULL,
label_size = NULL,
rel_heights = c(5, 1),
background_grid_major = "none",
risk_table_labels = TRUE,
print_hr = FALSE,
print_mst = FALSE,
print_pvalues = FALSE,
print_options = NULL,
cox_covariate_var = NULL,
cox_strat_var = NULL,
strat_scales = "fixed",
strat1_nrow = 1,
strat1_ncol = NULL,
strat2_nrow = NULL,
strat2_ncol = 1
)
Arguments
- data
Data frame.
- tte_var
Name of the variable containing time-to-event data.
- censor_var
Name of the variable containing censoring information. Censor variable must be numeric and encode 1 for event and 0 for censor.
- strat2_var
Name of the second stratification variable.
- colors
Vector with colors for treatment X biomarker levels. Unique colors can be generated with function `format_colors_cat_strata`. Alternatively, vector with colors for treatment levels.
- risk_table_labels
Possible values: "levels", "shape"
- print_options
Named vector. The default is c(npcx = 1, npcy = 0.05, hjust = 1, vjust = 0, size = 4) for text in the bottom right corner. For text in the top right corner use c(npcx = 1, npcy = 1, hjust = 1, vjust = 1, size = 4)