size.ci.prop1: Sample size for a single proportion confidence interval

View source: R/statpsych3.R

size.ci.prop1R Documentation

Sample size for a single proportion confidence interval

Description

Computes the sample size required to estimate a single proportion with desired confidence interval precision. Set the proportion planning value to .5 for a conservatively large sample size.

Usage

size.ci.prop1(alpha, p, w)

Arguments

alpha

alpha level for 1-alpha confidence

p

planning value of proportion

w

desired confidence interval width

Value

Returns the required sample size

Examples

size.ci.prop1(.05, .4, .2)

# Should return:
#      Sample size
# [1,]          93



statpsych documentation built on July 9, 2023, 6:50 p.m.