Skip to contents

Returns a table where stratification subgroups are in columns and distribution summary statistics for the numerical variable are in rows.

Usage

wrapper_kruskal_test_core_col_cat(
  data,
  num_var,
  cat_var,
  method = "kruskal",
  alternative = "two.sided",
  paired = FALSE,
  variable_names = NULL,
  caption = NULL,
  display_statistics = NULL,
  force_empty_cols = FALSE,
  print_pvalues = TRUE,
  drop = FALSE
)

wrapper_kruskal_test_core_col_cat_strat(
  data,
  num_var,
  cat_var,
  strat1_var = NULL,
  strat2_var = NULL,
  method = "kruskal",
  alternative = "two.sided",
  paired = 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.