Learn R Programming

statpsych (version 1.7.0)

power.prop: Approximates the power of a 1-group 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.prop(alpha, n, p, es)

Value

Returns the approximate power of the test

Arguments

alpha

alpha level for hypothesis test

n

planned sample size

p

planning value of proportion

es

planning value of proportion minus null hypothesis value

Examples

Run this code
power.prop(.05, 40, .5, .2)

# Should return:
#     Power
# 0.7156044


Run the code above in your browser using DataLab