Description Usage Arguments Value Author(s) See Also Examples
Uses Cohen's w for effect size to calculate sample size for a chi-squared test of independence.
1 | chisq_test_effect(w = NULL, groups = 2, sig_level = 0.05, power = 0.8)
|
w |
Effect size you want the test to be able to detect. (Optional) |
groups |
Number of groups. Used in degrees of freedom calculation. Defaults to 2 (e.g. control group vs treatment group). |
sig_level |
Probability of Type 1 error. Usually called alpha. Defaults to 0.05. |
power |
Ability to detect the effect. (1 - probability of Type 2 error) Defaults to 80%. |
If w
was not provided, returns a data frame containing
possible values of w and the corresponding sample size estimates.
Mikhail Popov
1 2 3 | chisq_test_effect()
chisq_test_effect(0.1)
chisq_test_effect(w = 0.1, groups = 3, sig_level = 0.001, power = 0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.