corsum_test: Association/Correlation Test from Summary Statistics

View source: R/corsum_test.R

corsum_testR Documentation

Association/Correlation Test from Summary Statistics

Description

[Stable]

Test for association between paired samples, using one of Pearson's product moment correlation coefficient, Kendall's \tau (tau) or Spearman's \rho (rho). This is the updated version of the TOSTr function.

Usage

corsum_test(
  r,
  n,
  alternative = c("two.sided", "less", "greater", "equivalence", "minimal.effect"),
  method = c("pearson", "kendall", "spearman"),
  alpha = 0.05,
  null = 0
)

Arguments

r

observed correlation

n

number of pairs of observations

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater", "less", "equivalence" (TOST), or "minimal.effect" (TOST). You can specify just the initial letter.

method

a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated.

alpha

alpha level (default = 0.05)

null

a number indicating the null hypothesis. Default is a correlation of zero.

Details

This function uses Fisher's z transformation for the correlations, but uses Fieller's correction of the standard error for Spearman's \rho and Kendall's \tau.

Value

A list with class "htest" containing the following components:

  • "statistic": z-score.

  • "p.value": the p-value of the test.

  • "estimate": the estimated measure of association, with name "cor", "tau", or "rho" corresponding to the method employed.

  • "null.value": the value of the association measure under the null hypothesis.

  • "alternative": character string indicating the alternative hypothesis (the value of the input argument alternative).

  • "method": a character string indicating how the association was measured.

  • "data.name": a character string giving the names of the data.

  • "call": the matched call.

References

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. https://doi.org/10.1348/000711009X475853, formula page 531.

See Also

Other Correlations: boot_cor_test(), plot_cor(), power_z_cor(), z_cor_test()


TOSTER documentation built on May 29, 2024, 9:57 a.m.