library(DGB)

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)

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)


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