automatedtests

Automatically run the best statistical test!

https://github.com/wouterzeevat/automatedtests

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Automatically run the best statistical test!

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created over 1 year ago · Last pushed 11 months ago
Metadata Files
Readme Changelog

readme.md

automatedtest automatical test function

Cran Version R-CMD-check CRAN Total 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

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

Installation

You can install the package from CRAN:

```r install.packages("automatedtests")

Load library

library(automatedtests) ```

Usage

Using a data frame

```r

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

```r

Compare Sepal.Length across Species

test2 <- automaticaltest(iris$Species, iris$Sepal.Length) test2$getresult() ```

One-sample tests

```r

Compare a numeric vector to a fixed value

automaticaltest(c(3, 5, 4, 6, 7), compareto = 5) ```

Arguments

| Argument | Description | |--------------|-------------| | ... | A data frame or multiple equal-length vectors | | compare_to | Value to compare against in one-sample tests (numeric or assumed uniform for categorical data) | | identifiers| Logical; if TRUE, the first column is treated as identifiers and excluded from testing | | paired | Logical; 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

```r

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.

Owner

  • Login: wouterzeevat
  • Kind: user

GitHub Events

Total
  • Create event: 3
  • Release event: 1
  • Issues event: 2
  • Watch event: 2
  • Issue comment event: 5
  • Push event: 27
Last Year
  • Create event: 3
  • Release event: 1
  • Issues event: 2
  • Watch event: 2
  • Issue comment event: 5
  • Push event: 27

Packages

  • Total packages: 1
  • Total downloads:
    • cran 256 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: automatedtests

Automating Choosing Statistical Tests

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 256 Last month
Rankings
Dependent packages count: 26.6%
Forks count: 29.0%
Dependent repos count: 32.8%
Stargazers count: 37.3%
Average: 42.5%
Downloads: 86.7%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R6 * imports
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite