MyNixOS website logo
Description

Automated Visualization of Statistical Tests.

Visualization of the most powerful statistical hypothesis test. The function vistat() visualizes the statistical hypothesis testing between the dependent variable (response) varsample and the independent variable (feature) varfactor. The statistical hypothesis test (including the eventual corresponding post-hoc analysis) with the highest statistical power fulfilling the assumptions of the corresponding test is chosen based on a decision tree. A graph displaying the raw data accordingly to the chosen test is generated, the test statistics including eventual post-hoc-analysis are returned. The automated workflow is especially suited for browser based interfaces to server-based deployments of R. Implemented tests: lm(), t.test(), wilcox.test(), aov(), kruskal.test(), fisher.test(), chisqu.test(). Implemented tests to check the normal distribution of standardized residuals: shapiro.test() and ad.test(). Implemented post-hoc tests: TukeyHSD() for aov() and pairwise.wilcox.test() for kruskal.test(). For the comparison of averages, the following algorithm is implemented: If the p-values of the standardized residuals of both shapiro.test() or ad.test() are smaller than 1-conf.level, kruskal.test() resp. wilcox.test() are performed, otherwise the oneway.test() and aov() resp. t.test() are performed and displayed. Exception: If the sample size is bigger than 100, t.test() is always performed and wilcox.test() is never executed (Lumley et al. (2002) <doi:10.1146/annurev.publhealth.23.100901.140546>). For the test of independence of count data, Cochran's rule (Cochran (1954) <doi:10.2307/3001666>) is implemented: If more than 20 percent of all cells have a count smaller than 5, fisher.test() is performed and displayed, otherwise chisqu.test(). In both cases case an additional mosaic plot is generated.

visStatistics

Visualization of the statistical hypothesis test between two groups of categorical or numerical data.

The function visstat()visualizes the statistical hypothesis testing between two groups of data, where varsample is the dependent variable (or response) and varfactor is the independent variable (feature). The statistical hypothesis test with the highest statistical power and fulfilling the assumptions of the corresponding test is performed and visualized. A graph displaying the raw data accordingly to the chosen test as well as the test statistics is generated. Furthermore visstat() returns the corresponding test statistics as text. The automated workflow is especially suited for browser based interfaces to server-based deployments of R. Implemented tests: lm(), t.test(), wilcox.test(), aov(), oneway.test(),kruskal.test(), fisher.test(),chisqu.test().

Installation from GitHub

  1. Firstly, you need to install the devtools package. You can do this from CRAN. Invoke R and then type install.packages("devtools")
  2. Load the devtools package. library(devtools)
  3. Install the package from the github- repository install_github("shhschilling/visStatistics")
  4. Load the package library(visStatistics)
  5. Help on the function usage ?visstat

Examples

Trees data set: Linear regression

visstat(trees,"Girth","Height")

Iris data set: Kruskal-Wallis test

visstat(iris,"Petal.Width", "Species")

InsectSprays data set: ANOVA

visstat(InsectSprays,"count","spray")

InsectSprays data set: Welch two sample t.test

InsectSpraysAB <- InsectSprays[ which(InsectSprays$spray == 'A'| InsectSprays$spray == 'B'), ] #select only sprays 'A und 'B'

InsectSpraysAB$spray = factor(InsectSpraysAB$spray)

visstat(InsectSpraysAB,"count","spray")

ToothGrowth data set: Wilcoxon rank sum test with continuity correction

visstat(ToothGrowth,"len", "supp")

HairEyeColor data set: Pearson's Chi-squared test

HairEyeColorMale = counts_to_cases(as.data.frame(HairEyeColor[,,1]))

visstat(HairEyeColorMale,"Hair","Eye")

Metadata

Version

0.1.1

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows