power.prop1: Approximates the power of a one-sample proportion test for a...

View source: R/statpsych3.R

power.prop1R Documentation

Approximates the power of a one-sample proportion test for a planned sample size

Description

Computes the approximate power of a one-sample proportion test for a planned sample size. Set the proportion planning value to .5 for a conservatively low power estimate. The value of the effect size need not be based on the proportion planning value.

Usage

power.prop1(alpha, n, p, es)

Arguments

alpha

alpha level for hypothesis test

n

planned sample size

p

planning value of proportion

es

planning value of proportion minus hypothesized value

Value

Returns the approximate power of the test

Examples

power.prop1(.05, 40, .5, .2)

# Should return:
#         Power
# [1,] 0.715613



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