powered_r: Compute r's post-hoc power

View source: R/powered_r.R

powered_rR Documentation

Compute r's post-hoc power

Description

Compute r's post-hoc power

Usage

powered_r(r = 0.2, n = 200L, sig_level = 0.05)

Arguments

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.

n

The current sample size. Non-integer n would be converted to be an integer using as.integer(). n should be at least 3.

sig_level

Expected significance level.

Value

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 (the non-centrality parameter of the t-distribution for the alternative hypothesis), and power (the post-hoc power of r at the sample size n).

References

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.

Examples

powered_r()

Keng documentation built on Sept. 1, 2026, 5:07 p.m.