Skip to contents

Logistic regression with simple additive model

Usage

wrapper_logistic_regression_core_simple(
  data,
  response_var,
  covariate_vars,
  return_vars = NULL,
  variable_names = NULL,
  caption = NULL,
  force_empty_cols = FALSE,
  print_total = TRUE,
  print_non_response = TRUE,
  print_pvalues = TRUE,
  print_adjpvalues = TRUE,
  print_OR = TRUE
)

wrapper_logistic_regression_core_simple_strat(
  data,
  response_var,
  covariate_vars,
  return_vars = NULL,
  strat1_var = NULL,
  strat2_var = NULL,
  variable_names = NULL,
  caption = NULL,
  force_empty_cols = FALSE,
  print_total = TRUE,
  print_non_response = TRUE,
  print_pvalues = TRUE,
  print_adjpvalues = TRUE,
  print_OR = TRUE
)

Arguments

data

Data frame.

response_var

Name of the response variable. This variable must be a factor where 'success' is interpreted as the factor not having the first level.

covariate_vars

Vector with names of covariate that should be included in the formula.

return_vars

Vector with names of covariate that for which the statistics should be returned. If NULL, statistics for all covariates are returned.

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.

force_empty_cols

Logical. Whether to display output columns which are all empty.

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.

strat1_var

Name of the second stratification variable.

Details

If for a factor covariate that should be returned the reference level has zero counts, results are set to NA because this levels is not used as a reference which means that it is not possible to estimate odds ratios that we want.