Computes Bonett-Price confidence interval for a ratio of population proportions in a within-subjects design.
Arguments: - alpha: alpha level for 1-alpha confidence - f12: number of participants who have attribute in condition 1 and condition 2 - f1: number of participants who have attribute in condition 1 - f2: number of participants who have attribute in condition 2
Values: - lower limit, upper limit
alpha = .05
f12 = 26
f1 = 4
f2 = 4
ci.ratio.prop.ps(alpha, f12, f1, f2)
## [1] 4.184526 10.096724
Computes sample size per group required to estimate a difference 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 - phi: planning value of phi coefficient - r: desired upper to lower interval endpoint ratio
Values: - required sample size
alpha = .05
p1= .4
p2 = .2
phi = .7
r = 2
size.ci.ratio.prop.ps(alpha, p1, p2, phi, r)
## [1] 67
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.