
Perform ANOVA and Multiple Comparisons Analysis
anova_analysis.Rd
Performs one-way ANOVA and Tukey's HSD test for multiple comparisons across different segments. Provides both statistical results and optional visualization.
Value
A tibble containing ANOVA results with columns:
segment_id: Segment identifier
term: Source of variation (label or Residuals)
df: Degrees of freedom
sumsq: Sum of squares
meansq: Mean squares
statistic: F-statistic
p.value: P-value
significant: Logical indicating if p.value < 0.05
Details
The function performs two main analyses:
One-way ANOVA for each segment
Tukey's HSD test for multiple comparisons with adjusted p-values
The printed output includes:
Tukey's HSD results with adjusted p-values
Significance levels: *** (p<0.001), ** (p<0.01), * (p<0.05), ns (p>=0.05)
Optional boxplot visualization