ci_oddsratio {confintr}R Documentation

Confidence Interval for the Odds Ratio

Description

This function calculates a confidence interval for the odds ratio in a 2x2 table/matrix or a data frame with two columns. The confidence interval is obtained through stats::fisher.test. Bootstrap confidence intervals are not available.

Usage

ci_oddsratio(x, probs = c(0.025, 0.975))

Arguments

x

A 2x2 table/matrix of frequencies, or a data.frame with exactly two columns.

probs

Error probabilites. The default c(0.025, 0.975) gives a symmetric 95% confidence interval.

Value

A list with class cint containing these components:

See Also

oddsratio.

Examples

x <- cbind(c(10, 5), c(4, 4))
ci_oddsratio(x)

[Package confintr version 0.1.1 Index]