The automatical_test
function automatically selects and runs the most fitting statistical test based on the data provided.
It can accept data as either a single data frame or multiple individual vectors, provided the vectors are of equal length.
If identifiers
is set to TRUE, the first column will be treated as identifiers and excluded from the test, supporting TIDY data.
When a multiple group test is selected (i.e., more than two groups, columns, or variables are used),
the first non-identifier column will be used as the grouping or target variable, meaning all other variables will be tested against it.
The paired
parameter can be used to force paired testing for supported tests (such as McNemar's test or Cochran's Q),
even if identifiers are not explicitly included in the input.
If you want to override the defaults, you can change the compare_to
value to specify one-sample tests.
Once the test has been executed, you can use the method $get_result()
on the resulting object to get more detailed information about the test's execution, including a summary of the test used and all statistics.
Supported tests:
ID | 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 |