compare_groups {exploratory} | R Documentation |
Compare groups
Description
Compares groups by (1) creating histogram by group; (2) summarizing descriptive statistics by group; and (3) conducting pairwise comparisons (t-tests and Mann-Whitney tests).
Usage
compare_groups(
data = NULL,
iv_name = NULL,
dv_name = NULL,
sigfigs = 3,
mann_whitney = TRUE,
t_test_stats = FALSE
)
Arguments
data |
a data object (a data frame or a data.table) |
iv_name |
name of the independent variable (grouping variable) |
dv_name |
name of the dependent variable (measure variable of interest) |
sigfigs |
number of significant digits to round to |
mann_whitney |
if |
t_test_stats |
if |
Value
the output will be a list of (1) ggplot object (histogram by group) (2) a data.table with descriptive statistics by group; and (3) a data.table with pairwise comparison results
Examples
compare_groups(data = iris, iv_name = "Species", dv_name = "Sepal.Length")