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

The usual formula for the c.i. of at difference of proportions is inaccurate. Newcombe has compared 11 methods and method 10 in his paper looks like a winner. It is implemented here.

1 2 3 4 5 6 |

`aa` |
Numeric vector of successes in sample 1. Can also be a matrix or array (see details). |

`bb` |
Successes in sample 2. |

`cc` |
Failures in sample 1. |

`dd` |
Failures in sample 2. |

`method` |
Method to use for calculation of confidence interval, see "Details". |

`alpha` |
Significance level |

`conf.level` |
Confidence level |

`print` |
Should an account of the two by two table be printed. |

`digits` |
How many digits should the result be rounded to if printed. |

`detail.labs` |
Should the computing of probability differences be reported in the labels. |

Implements method 10 from Newcombe(1998) (method="Nc") or from Agresti & Caffo(2000) (method="AC").

`aa`

, `bb`

, `cc`

and `dd`

can be vectors.
If `aa`

is a matrix, the elements `[1:2,1:2]`

are used, with
successes `aa[,1:2]`

. If `aa`

is a three-way table or array,
the elements `aa[1:2,1:2,]`

are used.

A matrix with three columns: probability difference, lower and upper
limit. The number of rows equals the length of the vectors `aa`

,
`bb`

, `cc`

and `dd`

or, if `aa`

is a 3-way matrix,
`dim(aa)[3]`

.

Bendix Carstensen, Esa Laara. http://BendixCarstensen.com

RG Newcombe: Interval estimation for the difference between independent proportions. Comparison of eleven methods. Statistics in Medicine, 17, pp. 873-890, 1998.

A Agresti & B Caffo: Simple and effective confidence intervals for proportions and differences of proportions result from adding two successes and two failures. The American Statistician, 54(4), pp. 280-288, 2000.

1 2 3 4 5 6 7 |

Epi documentation built on Oct. 3, 2016, 12:14 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.