| power_r | R Documentation |
Conduct a priori power analysis, and plan the sample size for r.
power_r(r = 0.2, sig_level = 0.05, power = 0.8, n_ul = 1450000000L)
r |
Pearson's correlation. Cohen(1988) suggested >=0.1, >=0.3, and >=0.5 as cut-off values of Pearson's correlation r for small, medium, and large effect sizes, respectively. |
sig_level |
Expected significance level. |
power |
Expected statistical power. |
n_ul |
The upper limit of the sample size below which the minimum required sample size is searched for.
Non-integer |
Power_r() follows Aberson (2019) approach to conduct power analysis.
n_ul determines the upper limit of the interval below which power_r() searches
for the minimum required sample size, hence the number of rows of the returned
power table priori and the right limit of the horizontal axis of the returned power plot.
When r is very small and power is larger than 0.8, a huge increase of
sample size only brings about a trivial increase in power,
which is cost-ineffective. To make power_r() omit unnecessary searching,
you could set n_ul to be a value less than 1.45e+09 (e.g., 10000).
A Keng_power class, also a list. If n is not given, the following results would be returned:
[[1]] r, the given r;
[[2]] d, Cohen's d derived from r; Cohen (1988) suggested >=0.2, >=0.5, and >=0.8
as cut-off values of d for small, medium, and large effect sizes, respectively;
[[3]] sig_level, the expected significance level;
[[4]] power, the expected power;
[[5]] n_ul, the upper limit of sample size;
[[6]] root, the exact decimal n found by internal uniroot() to reach the expected power;
[[7]] minimum, the minimum required sample size.
[[8]] priori, a priori power table with increasing sample sizes (n_i), and corresponding
df_i (the df of t-test at the sample size n_i, df_i = n_i - 2),
SE_i (the SE of r at the sample size n_i),
t_i (the t-test of r),
p_i (the p-value of t_i),
delta_i (the non-centrality parameter of the t-distribution for the alternative hypothesis, given r and n_i),
power_i (the actual power of r at the sample size n_i);.
If sample size n is given, the following results would also be returned:
Integer n, the t_test of r at the sample size n with
df, SE of r, p (the p-value of t-test), and the post-hoc power analysis with
delta_post (the non-centrality parameter of the t-distribution for the alternative hypothesis),
and power_post (the post-hoc power of r at the sample size n).
By default, print() prints the primary but not all contents of the Keng_power class.
To inspect more contents, use print.AsIs() or list extracting.
Aberson, C. L. (2019). Applied power analysis for the behavioral sciences. Routledge.
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Routledge.
power_r(0.2)
print(power_r(0.04))
plot(power_r(0.04))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.