MyNixOS website logo
Description

Automating Choosing Statistical Tests.

Automatically selects and runs the most appropriate statistical test for your data, returning clear, easy-to-read results. Ideal for all experience levels.

automatedtest automatical test function

Cran Version R-CMD-check CRAN Downloads

Automatically select and run the best statistical test for your data with just one line of code. Supporting one-sample-tests, two-sample-tests, multiple-sample-tests, and even correlations! automatedtests

What is automatedtest?

automatedtests is an R package designed to simplify statistical testing. It automatically analyzes your data, determines the most fitting statistical test (based on structure and content), and executes it. shortening the time spent deciding what test to use.

The package supports tidy data frames and a set of numeric/categorical vectors! non tidy data will have to be reshaped.

Features

  • Auto-detects best statistical test based on your data type and structure.
  • Handles tidy data: optional identifier exclusion.
  • Returns an AutomatedTest object with many different results including the full test $get_result().

Supported Tests

numbertest
1One-proportion test
2Chi-square goodness-of-fit test
3One-sample Student's t-test
4One-sample Wilcoxon test
5Multiple linear regression
6Binary logistic regression
7Multinomial logistic regression
8Pearson correlation
9Spearman's rank correlation
10Cochran's Q test
11McNemar's test
12Fisher's exact test
13Chi-square test of independence
14Student's t-test for independent samples
15Welch's t-test for independent samples
16Mann-Whitney U test
17Student's t-test for paired samples
18Wilcoxon signed-rank test
19One-way ANOVA
20Welch's ANOVA
21Repeated measures ANOVA
22Kruskal-Wallis test
23Friedman test

Installation

You can install the package from CRAN:

install.packages("automatedtests")

# Load library
library(automatedtests)

Usage

Using a data frame

# Automatically runs appropriate test(s) on the cars dataset
test1 <- automatical_test(cars)

# Get quick overview
test1

# Get detailed results
test1$get_result()

Using individual vectors

# Compare Sepal.Length across Species
test2 <- automatical_test(iris$Species, iris$Sepal.Length)
test2$get_result()

One-sample tests

# Compare a numeric vector to a fixed value
automatical_test(c(3, 5, 4, 6, 7), compare_to = 5)

Arguments

ArgumentDescription
...A data frame or multiple equal-length vectors
compare_toValue to compare against in one-sample tests (numeric or assumed uniform for categorical data)
identifiersLogical; if TRUE, the first column is treated as identifiers and excluded from testing
pairedLogical; if TRUE, the test will become paired, by default FALSE

Output

Returns an object of class AutomatedTest with methods and properties like:

  • print(object) - overview of executed test and its results.
  • $get_result() - detailed summary of the test performed, containing all information including p.value, statistics etc.
  • $get_test() - test type selected
  • $is_parametric() - Whether the numeric feature were parametric
  • $is_paired() - Returns if a paired test was used.
  • $get_strength() - Shows the strength of the test/correlation. This is a different kind of value for each test. It will also return what the value is. These are the different types of data it can return:
coefficient     – strength and direction of predictor effects  
r               – strength and direction of correlation  
mean difference – size of difference between group means  
statistic       – test statistic indicating group difference or association  
F statistic     – variance ratio across group means  
proportion      – estimated proportion of successes in a sample  
non-existent    – no interpretable strength measure available  
  • $get_parametric_list() - Returns a list of all numeric features' distributions and the parametric tests used.
  • $get_datatypes() - Shows what type of data the features used in the corresponding test contain.
  • $is_significant() - TRUE/FALSE if result is statistically significant (p.value < 0.05), to show the result in the blink of an eye!

Example Output

# Automated Test:
# Data:  speed, dist 
# Test:  Spearman's rank correlation 
# Test:  Spearman's rank correlation 
# Results: 
#  p.value:  8.824558e-14 
#  Strength:  r = 0.83 
#  Significant:  TRUE 

Method to choose stastitical test

Workflow

  • By Antoine Soetewey

Dependencies

  • R6
  • MASS
  • nnet
  • nortest
  • stats,
  • DescTools

These are automatically handled during installation.

Author

Wouter Zeevat

License

This package is licensed under the GPL-3 License.

You can freely use, modify, and redistribute the software under the terms of the GNU General Public License v3 (GPL-3). The key conditions of the GPL-3 license are:

  • You can use the package for personal, academic, or commercial purposes.
  • If you modify the package and distribute it, you must distribute the source code of your modified version.
  • Any derivative work must also be licensed under GPL-3.

For more information, see the full GPL-3 License.

Metadata

Version

0.1.2

License

Unknown

Platforms (76)

    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-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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