Performs a two one-sided tests procedure for equivalence of a Pearson correlation \(\rho\) to zero against user-specified equivalence bounds \([-\rho_L, \rho_U]\) (Counsell & Cribbie, 2015; Goertzen & Cribbie, 2010). Uses the Fisher's \(Z\) transformation throughout, a large-sample approximation whose accuracy under bivariate normality improves quickly with n. Equivalence is declared when the 100(1 - 2\(\alpha\))% Fisher's \(Z\) CI on \(\rho\) lies entirely inside the equivalence region.
equivalence_r(
r = NULL,
n = NULL,
x = NULL,
y = NULL,
rho_lower = NULL,
rho_upper = NULL,
alpha_level = 0.05
)A data.frame with rows for the observed r,
the two one-sided test statistics on the Fisher's \(Z\) scale,
their p-values, the joint TOST p-value, the
100(1 - 2\(\alpha\))% CI on \(\rho\), the equivalence bounds,
a binary equivalence flag, and the sample size (n).
Observed sample correlation r and sample size.
Alternatively supply x and y to compute r
from raw data.
Numeric vectors of paired observations. If supplied,
r and n are computed from the data and the
r/n arguments are ignored.
Equivalence bounds on the correlation
scale, both positive. The equivalence region is
\([-\rho_L, +\rho_U]\). If only rho_upper is supplied,
the bounds are symmetric.
One-sided significance level. Default 0.05.
Ken Kelley [email protected]
Fisher's \(Z\) transformation. $$Z = \tfrac{1}{2} \log\left(\frac{1 + r}{1 - r}\right), \quad \mathrm{Var}(Z) = \frac{1}{n - 3}.$$ The TOST is run on the Fisher's \(Z\) scale:
Lower test: \((Z - Z_{-\rho_L}) \sqrt{n - 3}\) compared against the upper \(\alpha\) of \(N(0, 1)\).
Upper test: \((Z - Z_{\rho_U}) \sqrt{n - 3}\) compared against the lower \(\alpha\) of \(N(0, 1)\).
The CI bounds are back-transformed from the \(Z\) scale via \(r = \tanh(Z)\) so they remain in \([-1, 1]\).
Choosing \(\rho_L\) and \(\rho_U\). Common choices in psychology are \(0.1\), or domain-specific meaningfulness thresholds (e.g., \(0.2\) for cognitive task correlations). The bounds must be set before data collection.
Counsell, A., & Cribbie, R. A. (2015). Equivalence tests for comparing correlation and regression coefficients. British Journal of Mathematical and Statistical Psychology, 68(2), 292--309. tools:::Rd_expr_doi("10.1111/bmsp.12045")
Goertzen, J. R., & Cribbie, R. A. (2010). Detecting a lack of association: An equivalence testing approach. British Journal of Mathematical and Statistical Psychology, 63(3), 527--537. tools:::Rd_expr_doi("10.1348/000711009X475853")
Lakens, D. (2017). Equivalence tests: A practical primer for t tests, correlations, and meta-analyses. Social Psychological and Personality Science, 8(4), 355--362. tools:::Rd_expr_doi("10.1177/1948550617697177")
equivalence_smd, ci_r
Other hypothesis tests:
adjusted_means(),
ancova(),
anova_within(),
ci_dunnett(),
ci_scheffe(),
ci_tukey_kramer(),
compare_cov_structures(),
contrast_test(),
correlations_test(),
equivalence_smd(),
factorial_anova(),
manova_split_plot(),
mauchly_test(),
mixed_anova(),
obrien_test(),
pairwise_within(),
randomization_test(),
randomization_test_paired(),
regions_of_significance(),
simple_effects_AB(),
summary_t_test(),
welch_t()
Other equivalence testing:
equivalence_c(),
equivalence_smd(),
plot_equivalence(),
power_density_equivalence_md(),
power_equivalence_c(),
power_equivalence_md(),
power_equivalence_md_plot(),
ss_power_equivalence_c()
# 1. Equivalence test that |rho| < 0.10 with n = 200 and r = 0.05:
equivalence_r(r = 0.05, n = 200, rho_upper = 0.10)
# 2. From raw data:
set.seed(113)
x <- rnorm(150); y <- 0.04 * x + rnorm(150)
equivalence_r(x = x, y = y, rho_upper = 0.15)
Run the code above in your browser using DataLab