pubh (version 1.1.16)

contingency2: 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

Run this code
# NOT RUN {
## 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")
# }

Run the code above in your browser using DataCamp Workspace