Learn R Programming

contingencytables (version 3.1.0)

Wald_test_and_CI_common_diff_stratified_2x2: The Wald test and CI for a common difference between probabilities

Description

The Wald test and CI for a common difference between probabilities based on either the Mantel-Haenszel or inverse variance estimate

Described in Chapter 10 "Stratified 2x2 Tables and Meta-Analysis"

Usage

Wald_test_and_CI_common_diff_stratified_2x2(
  n,
  estimatetype = "MH",
  alpha = 0.05
)

Value

An object of the contingencytables_result class, basically a subclass of base::list(). Use the utils::str() function to see the specific elements returned.

Arguments

n

the observed table (a 2x2xk matrix, where k is the number of strata)

estimatetype

Mantel-Haenszel or inverse variance estimate ('MH' or 'IV')

alpha

the nominal level, e.g. 0.05 for 95% CIs

Table orientation

In most study designs, rows designate a grouping of the data, for instance, into treatment or exposure groups, while the columns indicate a dichotomous outcome, usually with the first column representing the outcome of interest. This designation of rows and columns may not be relevant in all study designs, please see the introduction to chapter 10 for details.

Examples

Run this code
# Smoking and lung cancer (Doll and Hill, 1950)
Wald_test_and_CI_common_diff_stratified_2x2(doll_hill_1950)

# Prophylactice use of Lidocaine in myocardial infarction (Hine et al., 1989)
Wald_test_and_CI_common_diff_stratified_2x2(hine_1989)

Run the code above in your browser using DataLab