chisq.indep: Power calculation for chi-square test of independence
Description
Performs power and sample size calculations for a chi-square test of independence.
The user inputs a matrix of cell probabilities for a two-way table. The function computes
the power (or required total sample size) for a test of no association between the two factors.
Usage
chisq.indep(pmatrix = NULL, N = NULL, alpha = 0.05, power = NULL, v = FALSE)
Value
A list of the arguments (including the computed one).
Arguments
pmatrix
The two-way probability table under the alternative hypothesis. The probabilities must sum to 1.
N
The total number of observations.
alpha
The significance level (type 1 error rate); defaults to 0.05.
power
The specified level of power.
v
Either TRUE for verbose output or FALSE (default) to output computed argument only.