library(DGB)

Proportions from Paired Samples

ci.prop.ps

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)

size.ci.prop.ps

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)


cwendorf/dgb documentation built on May 3, 2022, 9:35 p.m.