- formula
A formula specifying the response and predictor variable (e.g., response ~ predictor)
.
more response variables and predictors can be added using -
or +
(e.g., response1 + response2 ~ predictor1 + predictor2)
. The function iterates through these combinations or response and predictors, because the Kruskal-Wallis test itself only allows one response and one predictor combination to be tested simultaneously.
- data
A data.frame
containing the variables referenced in the formula.
- plot
Logical. If TRUE
, generates plots (e.g., density plots and boxplots)
in the output files. Default is TRUE
.
- alpha
Numeric. The significance level for the Kruskal-Wallis test and Dunn's
test. Default is 0.05
.
- output_type
Character string. Specifies the output format: "pdf"
, "word"
, "excel"
, "rmd"
, "off"
(no file generated) or "console"
. The option "console"
forces output to be printed. Default is "off"
.
- output_file
Character string. The name of the output file (without extension).
If NULL
, a default name is generated based on the dataset name. Default is NULL
.
- output_dir
Character string specifying the name of the directory of the output file. Default is tempdir()
. If the output_file
already contains a directory name output_dir
can be omitted, if used it overwrites the dir specified in output_file
.
- save_in_wdir
Logical. If TRUE
, saves the file in the working directory Default is FALSE
, to avoid unintended changes to the global environment. If the output_dir
is specified save_in_wdir
is overwritten with output_dir
.
- kruskal_assumptions_text
Logical. If TRUE
, includes a section about Kruskal-Wallis test assumptions in the output document. Default is TRUE
.
- adjust
Character string. Adjustment method for pairwise comparisons in Dunn's test. Options include "holm", "hommel", "bonferroni", "sidak", "hs", "hochberg", "bh", "by", "fdr"
or "none"
. Default is "bonferroni"
, if you don't want to adjust the p value (not recommended), use p.adjust.method = "none"
.
- close_generated_files
Logical. If TRUE
, closes open 'Excel' or 'Word' files depending on the output format. This to be able to save the newly generated files. 'Pdf' files should also be closed before using the function and cannot be automatically closed. Default is FALSE
.
- open_generated_files
Logical. If TRUE
, opens the generated output files ('pdf', 'Word' or 'Excel') files depending on the output format. This to directly view the results after creation. Files are stored in tempdir(). Default is TRUE
.