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).
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
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 mann_whitney = TRUE, Mann-Whitney test
results will be included in the pairwise comparison data.table.
If mann_whitney = FALSE, Mann-Whitney tests will not be performed.
t_test_stats
if t_test_stats = TRUE, t-test statistic
and degrees of freedom will be included in the pairwise
comparison data.table.