confIntRiskDiff: Compute confidence interval for a risk difference

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

1
confIntRiskDiff(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.

Value

A list with the entries:

rd

Estimated risk difference.

CIs

Dataframe containing confidence intervals for the risk difference.

Author(s)

Leonhard Held

References

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

See Also

wilson

Examples

1
2
3
x <- c(30, 50)
n <- c(100, 120)
confIntRiskDiff(x, n)$CIs

biostatUZH documentation built on May 2, 2019, 6:06 p.m.