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

The function `propdiff.freq`

returns the required sample sizes to obtain a confidence interval of given length and confidence level for the difference between two binomial proportions.

1 | ```
propdiff.freq(len, p1.estimate, p2.estimate, level = 0.95)
``` |

`len` |
The desired total length of the confidence interval for the proportion |

`p1.estimate` |
A point estimate for the binomial proportion for the first population |

`p2.estimate` |
A point estimate for the binomial proportion for the second population |

`level` |
The desired level of the confidence interval (e.g., 0.95) |

Assume that a random sample from each of two populations will be
collected in order to estimate the difference between two independent binomial proportions.
Assume that the best point estimates for the unknown binomial proportions in the two populations are *(p1.estimate, p2.estimate)*, respectively.
The function `propdiff.freq`

returns the required sample sizes to attain the
desired length *len* and confidence level *level* for the confidence interval
for the difference between the two unknown proportions from a **frequentist** point of view, using a normal approximation.

The required sample sizes (n1, n2) for each group given the inputs to the function.

Lawrence Joseph lawrence.joseph@mcgill.ca, Patrick Belisle and Roxane du Berger

Lemeshow S, Hosmer Jr DW, Klar J, Lwanga SK.

Adequacy of Sample Size in Health Studies. Wiley and Sons, New York, 1990.

Joseph L, du Berger R, and Belisle P.

Bayesian and mixed Bayesian/likelihood criteria for sample size determination

Statistics in Medicine 1997;16(7):769-781.

`propdiff.acc`

, `propdiff.modwoc`

, `propdiff.woc`

, `propdiff.mblacc`

, `propdiff.mblalc`

, `propdiff.mblmodwoc`

, `propdiff.mblwoc`

1 | ```
propdiff.freq(len=0.01, p1.estimate=0.15, p2.estimate=0.20)
``` |

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.