confIntRiskRatio: Confidence interval for a risk ratio

View source: R/confIntDiagnostic.R

confIntRiskRatioR Documentation

Confidence interval for a risk ratio

Description

Provides a confidence interval for a risk ratio. The method is based on the Wald interval for the log risk ratio.

Usage

confIntRiskRatio(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 risk 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, confIntOddsRatio.

Examples


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


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