confIntRateDiff {biostatUZH}R Documentation

Compute confidence interval for a rate difference

Description

Two methods to compute a confidence interval for a rate difference based on Wald and Wilson confidence intervals for the individual rates are provided.

Usage

confIntRateDiff(x, t, conf.level = 0.95)

Arguments

x

vector of length 2, number of events in each group.

t

vector of length 2, total observation time in each group.

conf.level

Confidence level for confidence interval.

Value

A list with the entries:

rd

Estimated rate difference.

CIs

Dataframe containing confidence intervals for the rate difference.

Author(s)

Leonhard Held

References

Held, L., Rufibach, K. and Seifert, B. (2013). Medizinische Statistik - Konzepte, Methoden, Anwendungen. Section 8.2.

See Also

wilsonRate

Examples

x <- c(30, 50)
t <- c(100, 120)
confIntRateDiff(x, t)$CIs

[Package biostatUZH version 1.8.0 Index]