R: Confidence Interval for a Difference of Binomials

BinomDiffCI {DescTools} | R Documentation

## Confidence Interval for a Difference of Binomials

### Description

Calculate confidence interval for a risk difference.

### Usage

    BinomDiffCI(x1, n1, x2, n2, conf.level = 0.95,
                method = c("wald", "waldcor", "ac", "exact", "newcombe",
                           "newcombecor", "fm", "ha"))

### Arguments

`x1` | number of successes for the first group.
`n1` | number of trials for the first group.
`x2` | number of successes for the second group.
`n2` | number of trials for the second group.
`conf.level` | confidence level, defaults to 0.95.
`method` | one out of "wald", "waldcor", "ac", "exact", "newcombe", "newcombecor", "fm", "ha".

### Details

Still to follow. Methods "newcombecor", "fm", "ha" are not implemented yet.

### Value

A vector with 3 elements for estimate, lower confidence intervall and upper for the upper one.

### Author(s)

Andri Signorell <andri@signorell.net>

### References

Fagerland M W, Lydersen S and Laake P (2011) Recommended confidence intervals for two independent binomial proportions, Statistical Methods in Medical Research 0(0) 1-31

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_freq_a0000000642.htm#statug.freq.freqbincp

### See Also

`BinomCI`, `MultinomCI`, `binom.test`, `prop.test`

### Examples

    BinomDiffCI(14, 70, 32, 80, method="wald")
    BinomDiffCI(14, 70, 32, 80, method="waldcor")
    BinomDiffCI(14, 70, 32, 80, method="ac")
    BinomDiffCI(14, 70, 32, 80, method="newcombe")

[Package DescTools version 0.99.25 Index]