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

Description Usage Arguments See Also Examples

View source: R/epi_functions.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
## 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")

pubh documentation built on Feb. 17, 2021, 1:08 a.m.