library(DGB)
Computes adjusted Wald confidence interval for difference of population proportions in 2-level within-subjects design.
Arguments: - alpha: alpha level for 1-alpha confidence - f12: number of participants who have attribute in condition 1 but not condition 2 - f21: number of participants who have attribute in condition 2 but not in condition 1 - n: sample size
Values: - lower limit, upper limit
alpha = .05 f12 = 26 f21 = 4 n = 40 ci.prop.ps(alpha, f12, f21, n)
Computes sample size required to estimate a difference of proportions in 2-level within-subjects 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 - w: desired confidence interval width
Values: - required sample size
alpha = .05 p1 = .2 p2= .3 phi = .8 w = .1 size.ci.prop.ps(alpha, p1, p2, phi, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.