Learn R Programming

statpsych (version 1.7.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.

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

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