prop.1samp: Power calculation for one-sample proportion test
Description
Performs power and sample size calculations for a one-sample test of a proportion.
Calculations use the large-sample normal approximation to the binomial. Can solve
for power, N or alpha.
Usage
prop.1samp(
N = NULL,
p0 = NULL,
pA = NULL,
alpha = 0.05,
power = NULL,
sides = 2,
v = FALSE
)
Value
A list of the arguments (including the computed one).
Arguments
N
The sample size.
p0
The proportion under the null.
pA
The true proportion.
alpha
The significance level (type 1 error rate); defaults to 0.05.
power
The specified level of power.
sides
Either 1 or 2 (default) to specify a one- or two- sided hypothesis test.
v
Either TRUE for verbose output or FALSE (default) to output computed argument only.