a categorical explanatory variable. It will coerced to be
a factor.
method
character. Either "anova", or "kw" (see details).
digits
Number of significant digits to print.
horizontal
logical. If TRUE, boxplots are plotted horizontally.
posthoc
logical. If TRUE, the default, perform pairwise post-hoc comparisons
(TukeyHSD for ANOVA and Conover Test for Kuskal Wallis). This test
will only be performed if there are 3 or more levels for X.
Value
a list with 3 components:
result
omnibus test
summarystats
summary statistics
plot
ggplot2 graph
Details
The groupdiff function performs one of two analyses:
anova
A one-way analysis of variance, with TukeyHSD
post-hoc comparisons.
kw
A Kruskal Wallis Rank Sum Test, with Conover
Test post-hoc comparisons.
In each case, summary statistics and a grouped boxplots are
provided. In the parametric case, the statistics are n, mean, and
standard deviation. In the nonparametric case the statistics are
n, median, and median absolute deviation. If posthoc = TRUE,
pairwise comparisons of superimposed on the boxplots.
Groups that share a letter are not significantly different (p < .05),
controlling for multiple comparisons.