Computes adjusted Wald confidence interval for ratio of population proportions in 2-group design.
Arguments: - alpha: alpha level for 1-alpha confidence - f1: number of participants in group 1 with attribute - f2: number of participants in group 2 with attribute - n1: sample size of group 1 - n2: sample size of group 2
Values: - proportions, lower limit, upper limit
alpha = .05
f1 = 35
f2 = 21
n1 = 150
n2 = 150
ci.ratio.prop.is(alpha, f1, f2, n1, n2)
## prop1 prop2 LL UL
## [1,] 0.2333333 0.14 1.017253 2.705025
Computes sample size per group required to estimate a ratio of proportions in 2-group design with desired precision.
Arguments: - alpha: alpha level for 1-alpha confidence - p1: planning value of proportion for group 1 - p2: planning value of proportion for group 2 - r: desired upper to lower interval endpoint ratio
Values: - required sample size
alpha = .05
p1 = .4
p2= .2
r = 2
size.ci.ratio.prop.is(alpha, p1, p2, r)
## [1] 176
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.