contingency2: Measures of association from two by two contingency tables...

View source: R/epi_functions.R

contingency2R Documentation

Measures of association from two by two contingency tables (direct input).

Description

contingency2 is a wrap that calls epi.2by2 from package epiR.

Usage

contingency2(aa, bb, cc, dd, ...)

Arguments

aa

Number of cases where both exposure and outcome are present.

bb

Number of cases where exposure is present but outcome is absent.

cc

Number of cases where exposure is absent but outcome is present.

dd

Number of cases where both exposure and outcome are absent.

...

Further arguments passed to epi.2by2.

See Also

epi.2by2.

Examples

## A case-control study on the effect of alcohol on oesophageal cancer.
Freq <- c(386, 29, 389, 171)
status <- gl(2, 1, 4, labels = c("Control", "Case"))
alcohol <- gl(2, 2, labels = c("0-39", "40+"))
cancer <- data.frame(Freq, status, alcohol)
cancer <- expand_df(cancer)

contingency2(171, 389, 29, 386, method = "case.control")

josie-athens/pubh documentation built on Feb. 3, 2024, 4:32 a.m.