Package: visStatistics
Type: Package
Title: Automated Selection and Visualisation of Statistical Hypothesis
        Tests
Version: 0.2.0
Authors@R: c(
    person("Sabine", "Schilling",
           email = "sabineschilling@gmx.ch",
           role = c("cre", "aut", "cph"),
           comment = c(ORCID = "0000-0002-8318-9421", year = "2026")),
    person("Peter", "Kauf",
           email = "peter.kauf@zhaw.ch",
           role = "ctb")
    )
Description: The right test, visualised. 'visStatistics' automatically
    selects and visualises statistical hypothesis tests comparing two vectors,
    based on their class, distribution, and sample size.
    Visual outputs, including box plots, bar charts, regression lines with
    confidence bands, mosaic plots, residual plots, and Q-Q plots, are
    annotated with relevant test statistics, assumption checks, and post-hoc
    analyses where applicable.
    The algorithmic workflow shifts attention from ad-hoc test selection to
    visual diagnostic assessment and statistical interpretation. 
    It is particularly suited for server-side R applications, where end users
    interact solely through a web
    interface to select data groups and receive a complete visual statistical
    analysis automatically. The same automation makes it useful in
    time-constrained contexts such as statistical consulting, where it reduces
    effort spent on test selection and leaves more room for interpretation.
    The implemented tests cover the most frequently applied inferential methods
    in biomedical research (Hayat et al. (2017)
    <doi:10.1371/journal.pone.0179032>).
    The test selection algorithm proceeds as follows: Input vectors of class
    numeric or integer are considered numerical; those of class factor are
    considered categorical; those of class ordered are considered ordinal.
    Assumptions of residual normality and homogeneity of variances are
    considered met if the corresponding test yields a p-value greater than the
    significance level alpha = 1 - conf.level.
    (1) When the response is numerical and the predictor is categorical, a test
    comparing central tendencies is selected. If every group contains more than 
    50 observations, the sampling distribution of the group means is assumed 
    approximately normal by the central limit theorem (Lumley et al. (2002)
    <doi:10.1146/annurev.publhealth.23.100901.140546>); otherwise, residual
    normality is assessed using shapiro.test() applied to the standardised
    residuals of lm(). If normality is not met, wilcox.test() is used when the
    predictor has two levels and kruskal.test() followed by
    pairwise.wilcox.test() otherwise. If normality is met, levene.test()
    assesses variance homogeneity. For two-level predictors, Student's
    t.test(var.equal = TRUE) is applied if variances are homogeneous and
    Welch's t.test() otherwise. For predictors with more than two levels,
    aov() followed by TukeyHSD() is applied if variances are homogeneous, and
    oneway.test() followed by games.howell() otherwise.
    (2) When both vectors are numerical, lm() is fitted by default
    (correlation = FALSE). If correlation = TRUE, Spearman rank correlation is
    performed.
    (3) When the response is ordinal, it is converted to numeric ranks and the
    non-parametric path from (1) is followed (Wilcoxon or Kruskal-Wallis).
    When both variables are ordinal and correlation = TRUE, Kendall's tau_b is
    used instead.
    (4) When both vectors are categorical, Cochran's rule (Cochran (1954)
    <doi:10.2307/3001666>) is applied to test independence either by
    chisq.test() or fisher.test().
License: MIT + file LICENSE
URL: https://github.com/shhschilling/visStatistics,
        https://shhschilling.github.io/visStatistics/
BugReports: https://github.com/shhschilling/visStatistics/issues
Imports: Cairo, graphics, grDevices, grid, multcompView, nortest,
        stats, utils, vcd
Suggests: knitr, rmarkdown, spelling, testthat (>= 3.0.0)
VignetteBuilder: knitr
BuildVignettes: true
Config/testthat/edition: 3
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2026-05-12 13:06:50 UTC; sschilli
Config/roxygen2/version: 8.0.0
Language: en-GB
Author: Sabine Schilling [cre, aut, cph] (ORCID:
    <https://orcid.org/0000-0002-8318-9421>, year: 2026),
  Peter Kauf [ctb]
Maintainer: Sabine Schilling <sabineschilling@gmx.ch>
Repository: CRAN
Date/Publication: 2026-05-12 18:40:02 UTC
Built: R 4.7.0; ; 2026-07-17 03:24:27 UTC; windows
