confIntOddsRatio: Confidence interval for an odds ratio

View source: R/confIntDiagnostic.R

confIntOddsRatioR Documentation

Confidence interval for an odds ratio

Description

Confidence interval for an odds ratio. The method is based on the Wald interval for the log odds ratio.

Usage

confIntOddsRatio(x, n, conf.level = 0.95)

Arguments

x

Vector of length 2, number of successes in each group.

n

Vector of length 2, total number of trials in each group.

conf.level

Confidence level for confidence interval. Default value is 0.95.

Value

A vector containing the odds ratio and the limits of the confidence interval.

Author(s)

Leonhard Held

References

DG Altman, D Machin, TN Bryant, MJ Gardner. Statistics with confidence, 2nd Edition, 2000, Chapter 7

See Also

confIntDiagnostic, confIntRiskRatio, confIntRiskDiff.

Examples


x <- c(30, 50)
n <- c(100, 120)
confIntOddsRatio(x = x, n = n)


felix-hof/biostatUZH documentation built on Sept. 27, 2024, 1:48 p.m.