power.chisq.test | R Documentation |
Calculates statistical power for the generic chi-square test with (optional) Type I and Type II error plots.
Unlike other more specific functions power.chisq.test()
function allows multiple values for one parameter at a time (only when plot = FALSE
).
power.chisq.test(ncp, df, alpha = 0.05, plot = TRUE,
plot.main = NULL, plot.sub = NULL,
verbose = TRUE)
ncp |
non-centrality parameter (lambda) |
df |
degrees of freedom. For example, for the test of homogeneity or independence df = (nrow - 1)*(ncol - 1) |
alpha |
probability of type I error |
plot |
if |
plot.main |
plot title |
plot.sub |
plot subtitle |
verbose |
if |
power |
statistical power |
# power is defined as the probability of observing Chi-square-statistics
# greater than the critical Chi-square value
power.chisq.test(ncp = 20, df = 100, alpha = 0.05)
# power of multiple Chi-square-statistics
power.chisq.test(ncp = c(5, 10, 15, 20), plot = FALSE,
df = 100, alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.