Description Usage Arguments Details Value Examples
View source: R/pwr_z_fisher_test.R
pwr_z_fisher_test
computes the power and the sample size for testing
Pearson's correlation using Fisher's Z transform.
1 2 | pwr_z_fisher_test(rho, rho0, n = NULL, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)
|
rho |
Pearson's correlation |
rho0 |
Pearson's correlation under null hypothesis |
n |
number of observations (sample size) |
pwr |
power of test 1 + β (1 minus type II error probability) |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less" |
sig_level |
significance level (Type I error probability) |
It can be proved that \frac{1}{2} \log≤ft(\frac{1 + r}{1 - r}\right) has asympotc normal distribution with mean #' \frac{1}{2} \log≤ft(\frac{1 + ρ}{1 - ρ}\right) and variance √{\frac{1}{n - 3}}, where n is the sample size, ρ is the populational Pearson's correlation, and r is the sample correlation.
It's require to give the population Pearson's correlation and Pearson's correlation under null hypothesis.
pwr_z_fisher_test
returns a list with the following
components:
Pearson's correlation
Pearson's correlation under null hypothesis
significance level
A tibble
with sample size n
and
power pwr
1 2 3 4 5 6 | # Power
pwr_z_fisher_test(rho = 0.8, rho0 = 0.7, n = 100, pwr = NULL,
alternative = "two.sided", sig_level = 0.05)
# Sample size
pwr_z_fisher_test(rho = 0.8, rho0 = 0.7, n = NULL, pwr = 0.99,
alternative = "two.sided", sig_level = 0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.