library(DGB)
Computes adjusted Wald confidence interval for difference 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: - MLEs, SE, lower limit, upper limit
alpha = .05 f1 = 35 f2 = 21 n1 = 150 n2 = 150 ci.prop.is(alpha, f1, f2, n1 ,n2)
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 - w: desired confidence interval width
Values: - required sample size
alpha = .05 p1 = .2 p2 = .4 w = .2 size.ci.prop.is(alpha, p1, p2, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.