Skip to contents

Mantel-Haenszel Stratified Analysis

Usage

mantelhaenszel(
  data,
  rows,
  cols,
  strata,
  measure = "or",
  alpha = 0.05,
  show_stratum_tables = TRUE,
  show_homogeneity_tests = TRUE,
  show_crude_analysis = TRUE,
  continuity_correction = TRUE,
  show_methodology = FALSE,
  show_references = FALSE
)

Arguments

data

.

rows

.

cols

.

strata

.

measure

.

alpha

.

show_stratum_tables

.

show_homogeneity_tests

.

show_crude_analysis

.

continuity_correction

.

show_methodology

.

show_references

.

Value

A results object containing:

results$mh_summarya table
results$crude_analysisa table
results$homogeneity_testsa table
results$stratum_specifica table
results$interpretationa html
results$methodologya html
results$referencesa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$mh_summary$asDF

as.data.frame(results$mh_summary)