Kruskal-Wallis H test or Wilcoxon Rank-Sum test (know also as Wilcoxon-Mann-Whitney test) or t-test
wrapper_kruskal_test_core_col_num.Rd
Returns a table where stratification subgroups are in rows and distribution summary statistics for the numerical variable are in columns.
Usage
wrapper_kruskal_test_core_col_num(
data,
num_var,
cat_var,
method = "kruskal",
alternative = "two.sided",
paired = FALSE,
pairwise = FALSE,
variable_names = NULL,
caption = NULL,
display_statistics = NULL,
force_empty_cols = FALSE,
print_pvalues = TRUE,
drop = FALSE
)
wrapper_kruskal_test_core_col_num_strat(
data,
num_var,
cat_var,
strat1_var = NULL,
strat2_var = NULL,
method = "kruskal",
alternative = "two.sided",
paired = FALSE,
pairwise = FALSE,
variable_names = NULL,
caption = NULL,
display_statistics = NULL,
force_empty_cols = FALSE,
print_pvalues = TRUE,
print_adjpvalues = TRUE,
drop = FALSE
)
Arguments
- data
Data frame.
- num_var
Name of a numerical variable.
- cat_var
Name of a categorical variable. That variable must be a factor with at least two levels.
- method
Test to be used. Possible values: "kruskal", "wilcox", "t".
- paired
Logical. Paired test is possible only for wilcox and t. The data must be ordered by the pairing variable, usually subject ID.
- display_statistics
Vector of possible values: "N", "Median", "Mean", "Min", "Max", "First.Quartile", "Third.Quartile".
- strat1_var
Name of the second stratification variable.