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

View source: R/statpsych3.R

size.test.prop1R Documentation

Sample size for a test of a single proportion

Description

Computes the sample size required to test a single population proportion with desired power in a 1-group design. Set the proportion planning value to .5 for a conservatively large sample size. The value of the effect size (expected population proportion minus hypothesized value) need not be based on the proportion planning value.

Usage

size.test.prop1(alpha, pow, p, es)

Arguments

alpha

alpha level for hypothesis test

pow

desired power

p

planning value of proportion

es

planning value of proportion minus null hypothesis value

Value

Returns the required sample size

Examples

size.test.prop1(.05, .9, .5, .2)

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



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