chisq.indep | R Documentation |
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.
chisq.indep(pmatrix = NULL, N = NULL, alpha = 0.05, power = NULL, v = FALSE)
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. |
A list of the arguments (including the computed one).
chisq.indep(pmatrix = matrix(c(0.050, 0.350, 0.100, 0.075, 0.250, 0.175),
nrow = 2, byrow = TRUE), N = 230)
chisq.indep(pmatrix = matrix(c(0.3, 0.2, 0.4, 0.1), nrow = 2, byrow = TRUE), N = 200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.