docs/prop.os.md

Proportion from One Sample

ci.prop.os

Computes adjusted Wald confidence interval for a population proportion.

Arguments: - alpha: alpha level for 1-alpha confidence - f: number of participants with attribute - n: sample size

Values: - row 1: adjusted MLE, SE of adjusted MLE, adjusted Wald CI - row 2: MLE, SE of MLE, Wilson CI with continuity correction

alpha = .05
f = 12
n = 100
ci.prop.os(alpha, f, n)
##                     prop         SE         LL        UL
## Adjusted Wald  0.1346154 0.03346842 0.06901848 0.2002123
## Wilson with cc 0.1200000 0.03249615 0.06625153 0.2039772

size.ci.prop.os

Computes sample size required to estimate a proportion with desired precision.

Arguments: - alpha: alpha level for 1-alpha confidence - p: planning value of proportion - w: desired confidence interval width

Values: - required sample size

alpha = .05
p = .2
w = .1
size.ci.prop.os(alpha, p, w)
## [1] 246


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