| quick_anova | R Documentation |
Conduct one-way ANOVA, Welch ANOVA, or Kruskal-Wallis test with automatic assumption checks, publication-ready visualization, and optional post-hoc comparisons. Designed for comparing two or more independent groups.
quick_anova(
data,
group,
value,
method = c("auto", "anova", "welch", "kruskal"),
post_hoc = c("auto", "none", "tukey", "welch", "wilcox"),
conf.level = 0.95,
plot_type = c("boxplot", "violin", "both"),
add_jitter = TRUE,
point_size = 2,
point_alpha = 0.6,
show_p_value = TRUE,
p_label = c("p.format", "p.signif"),
palette = "qual_vivid",
verbose = TRUE,
...
)
data |
A data frame containing the variables. |
group |
Column name for the grouping factor. Supports quoted or unquoted names via tidy evaluation. |
value |
Column name for the numeric response variable. |
method |
Character. One of "auto" (default), "anova", "welch", or "kruskal". When "auto", the function inspects normality and homogeneity of variances to pick an appropriate test. |
post_hoc |
Character. Post-hoc procedure: "auto" (default), "none", "tukey", "welch", or "wilcox". "auto" selects Tukey for ANOVA, Welch-style pairwise t-tests for Welch ANOVA, and pairwise Wilcoxon tests for Kruskal-Wallis. |
conf.level |
Numeric. Confidence level for the test/intervals. Default is 0.95. |
plot_type |
Character. One of "boxplot", "violin", or "both". |
add_jitter |
Logical. Add jittered points? Default TRUE. |
point_size |
Numeric. Size of jitter points. Default 2. |
point_alpha |
Numeric. Transparency for jitter points (0-1). Default 0.6. |
show_p_value |
Logical. Show omnibus p-value on the plot? Default TRUE. |
p_label |
Character. P-value display: "p.format" (default) or "p.signif" (stars). |
palette |
Character. Palette name from evanverse, or NULL for defaults. |
verbose |
Logical. Print informative messages? Default TRUE. |
... |
Reserved for future extensions. |
An object of class quick_anova_result with elements:
ggplot object of the comparison
List describing the main test
Post-hoc comparison table (if requested)
Character. "anova", "welch", or "kruskal"
Summary statistics by group
Results of normality/variance checks
Details explaining automatic selections
POSIXct timestamp of the analysis
aov, oneway.test,
kruskal.test
set.seed(123)
df <- data.frame(
group = rep(LETTERS[1:3], each = 40),
value = rnorm(120, mean = rep(c(0, 0.5, 1.2), each = 40), sd = 1)
)
res <- quick_anova(df, group, value)
res$plot
summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.