Learn R Programming

statpsych (version 2.0.0)

size.test.prop: Sample size for a test of a single proportion

Description

Computes the sample size required to test a population proportion with desired power (using a correction for continuity) in a 1-group design.

For more details, see Section 1.15 of Bonett (2021, Volume 3)

Usage

size.test.prop(alpha, pow, p, h)

Value

Returns the required sample size

Arguments

alpha

alpha level for hypothesis test

pow

desired power

p

planning value of proportion

h

null hypothesis value of proportion

References

Fleiss2003statpsych

Bonett2021statpsych

Examples

Run this code
size.test.prop(.05, .9, .5, .3)

# Should return:
# Sample size
#          65


Run the code above in your browser using DataLab