Skip to contents

Log-rank test testing treatment effect within biomarker subgroups

Usage

wrapper_log_rank_test_treatment(
  data,
  tte_var,
  censor_var,
  treatment_var,
  biomarker_vars = NULL,
  strata_vars = NULL,
  strat2_var = NULL,
  variable_names = NULL,
  caption = NULL,
  sr_times = NULL,
  print_nevent = TRUE,
  print_mst = TRUE,
  print_hr = TRUE,
  print_total = TRUE,
  print_pvalues = TRUE,
  print_adjpvalues = TRUE
)

Arguments

data

Data frame.

tte_var

Name of the time-to-event variable. This variable must be numeric.

censor_var

Name of the censor variable. It has to be numeric and encode 1 for event and 0 for censor.

treatment_var

Name of column with treatment information.

biomarker_vars

Vector with names of categorical biomarkers. When NULL, overall treatment effect is estimated.

strata_vars

Vector with names of covariates that are used as strata.

strat2_var

Name of the second stratification variable.

variable_names

Named vector with variable names. If not supplied, variable names are created by replacing in column names underscores with spaces.

caption

Caption for the table with results.

print_nevent

Logical. Whether to print numbers of events.

print_mst

Logical. Whether to print median survival time (MST).

print_hr

Logical. Whether to print hazard rations estimated with Cox regression.

print_total

Logical. Whether to print total number of samples and total number of events.

print_pvalues

Logical. Whether to print p-values.

print_adjpvalues

Logical. Whether to print adjusted p-values.