Skip to contents

Testing biomarker effect on response with Pearson's Chi-squared test or Cochran-Mantel-Haenszel Chi-Squared Test

Usage

wrapper_pearsons_test_biomarker(
  data,
  response_var,
  biomarker_vars,
  treatment_var = NULL,
  strata_vars = NULL,
  strat2_var = NULL,
  method = "pearson",
  variable_names = NULL,
  caption = NULL,
  print_total = TRUE,
  print_non_response = TRUE,
  print_pvalues = TRUE,
  print_adjpvalues = TRUE
)

Arguments

data

Data frame.

response_var

Name of categorical variable defining successes and failures where the first level corresponds to failure and the second level corresponds to success.

biomarker_vars

Vector of biomarker names.

strata_vars

Stratification factors. If defined, then the Cochran-Mantel-Haenszel Chi-Squared Test is applied.

method

Method 'pearson' or 'fisher' test.

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_total

Logical. Whether to print total number of samples.

print_pvalues

Logical. Whether to print p-values.

print_adjpvalues

Logical. Whether to print adjusted p-values.