size.ci.prop.prior: Sample size for a proportion confidence interval using a...

View source: R/statpsych3.R

size.ci.prop.priorR Documentation

Sample size for a proportion confidence interval using a planning value from a prior study

Description

Computes the sample size required to estimate a population proportion with desired confidence interval precision in applications where an estimated proportion from a prior study is available. The actual confidence interval width in the planned study will depend on the value of the estimated proportion in the planned study. An estimated proportion from a prior study is used to predict the value of the estimated proportion in the planned study, and the predicted proportion estimate is then used in the sample size computation.

This sample size approach assumes that the population proportion in the prior study is very similar to the population proportion in the planned study. In a typical sample size analysis, this type of information is not available, and the researcher must use expert opinion to guess the value of the proportion that will be observed in the planned study. The size.ci.prop) function uses a proportion planning value that is based on expert opinion regarding the likely value of the proportion estimate that will be observed in the planned study.

Usage

size.ci.prop.prior(alpha1, alpha2, p0, n0, w)

Arguments

alpha1

alpha level for 1-alpha1 confidence in the planned study

alpha2

alpha level for the 1-alpha2 prediction interval

p0

estimated proportion in prior study

n0

sample size in prior study

w

desired confidence interval width

Value

Returns the required sample size

Examples

size.ci.prop.prior(.05, .20, .1425, 200, .1)

# Should return:
# Sample size
#         318



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.