Learn R Programming

rstatix (version 1.1.0)

rstatix-references: References and related packages

Description

Where the methods in rstatix come from, and which other packages implement them.

Most of the statistical methods in rstatix are implemented in base R from the published formulas. A few call another package to compute the result, and one is adapted from another package's code; Adapted code below says which. Where a function records the source of its method, it does so in its own References section; cite those authors, not this package, when you report a result.

Arguments

Method sources

  • Cramer's V — Cramer, H. (1946) Mathematical Methods of Statistics. See cramer_v().

  • Effect-size confidence intervals (partial eta squared, Cramer's V) — obtained by inverting a noncentral distribution: Smithson, M. (2003) Confidence Intervals; Steiger, J. H. (2004) Beyond the F test. Psychological Methods, 9, 164-182. See anova_test() and cramer_v().

  • Conover's all-pairs test — Conover, W. J. (1999) Practical Nonparametric Statistics, 3rd edition. See conover_test() and friedman_conover_test().

  • Nemenyi's all-pairs test — Nemenyi, P. (1963) Distribution-free Multiple Comparisons. See friedman_nemenyi_test().

  • Compact letter display — Piepho, H.-P. (2004) An algorithm for a letter-based representation of all-pairwise comparisons. Journal of Computational and Graphical Statistics, 13, 456-466. See add_cld().

  • Dunnett's many-to-one comparisons — Dunnett, C. W. (1955) A multiple comparison procedure for comparing several treatments with a control. Journal of the American Statistical Association, 50, 1096-1121. See dunnett_test().

Related packages

The following packages implement some of the same methods. rstatix compares its results against them while developing, and they offer functionality that rstatix does not:

  • effectsize — a broad effect-size toolkit; effectsize::cramers_v() and effectsize::eta_squared() produce the same intervals as cramer_v(ci = TRUE), anova_test(ci = ), and eta_squared(ci = ) / partial_eta_squared(ci = ) when called with alternative = "two.sided", which is not their default.

  • DescToolsDescTools::CramerV() and DescTools::DunnettTest().

  • multcompmultcomp::glht() for general linear hypotheses, including Dunnett contrasts.

  • multcompViewmultcompView::multcompLetters() for compact letter displays.

  • PMCMRplus — a large collection of all-pairs and many-to-one nonparametric procedures, including the Conover and Nemenyi tests.

These packages are not dependencies of rstatix. The values they return are recorded in the rstatix test suite as fixed numbers, checked against the package they came from at the time they were written; a recorded number cannot detect a later change in the package that produced it.

Adapted code

Of the functions documented in this package, sign_test() is the exception to the description above. Its one- and two-sample test code, and the confidence interval it reports for the median, are adapted with modifications from DescTools::SignTest() and DescTools::MedianCI(), written by Andri Signorell. DescTools is distributed under GPL (>= 2); rstatix is distributed under GPL-2.

No other source file in rstatix carries a statistical method adapted from a contributed package. Argument-validation idioms are shared with base R — check_two_samples_test_args() follows the preamble of stats::wilcox.test(), as DescTools and PMCMRplus do — and those are not methods anyone cites. The test suite scans the sources for the phrases that declare an adaptation and fails when one appears in a file this section does not name; code copied without a word about it would not be caught that way.

Copying code is not the same as calling it. Several functions compute their result by calling another package, as each of them states in its own documentation: anova_test() uses car::Anova() for type II and type III sums of squares, and stats::aov() for type I; dunnett_test() and emmeans_test() use emmeans::emmeans(); and wilcox_effsize() takes its default statistic (r = Z / sqrt(N)) from coin::wilcoxsign_test() or coin::wilcox_test(), while its method = "rank_biserial" alternative is computed in base R.

See Also

cramer_v(), anova_test(), conover_test(), add_cld(), dunnett_test().