Skip to contents

Advanced ANOVA analysis with comprehensive post hoc testing, effect sizes, and assumption checking. Addresses the critical issue where 68\

Usage

advancedanova(
  data,
  dependent,
  fixed,
  covariates,
  wls,
  model_type = "oneway",
  posthoc_method = "tukey",
  control_group = "",
  assumptions = TRUE,
  effect_sizes = TRUE,
  descriptives = TRUE,
  show_plots = TRUE,
  plot_type = "both",
  confidence_level = 0.95,
  alpha_level = 0.05,
  welch_correction = FALSE,
  robust_anova = FALSE
)

Arguments

data

the data as a data frame

dependent

The dependent variable from data, variable must be numeric

fixed

The grouping variable(s) from data, variable(s) must be a factor

covariates

Optional covariates for ANCOVA analysis

wls

Optional weights for weighted least squares

model_type

Type of ANOVA model to fit

posthoc_method

Post hoc comparison method

control_group

Control group for Dunnett's test comparisons

assumptions

Check and report ANOVA assumptions

effect_sizes

Calculate eta-squared, omega-squared, and Cohen's f

descriptives

Show descriptive statistics for each group

show_plots

Generate diagnostic and comparison plots

plot_type

Type of plots to generate

confidence_level

Confidence level for effect size confidence intervals

alpha_level

Alpha level for significance testing

welch_correction

Apply Welch correction for unequal variances

robust_anova

Use robust ANOVA methods for non-normal data

Value

A results object containing:

results$instructionsInstructions for using the Advanced ANOVA Suite
results$descriptivesDescriptive statistics for each group
results$assumptionsTests of ANOVA assumptions
results$anovaMain ANOVA results with effect sizes
results$tukeyTukey Honestly Significant Difference test results
results$gameshowellGames-Howell test for unequal variances
results$dunnettDunnett's test comparing treatments to control
results$bonferroniBonferroni-corrected pairwise comparisons
results$anovaplotViolin plots with boxplots and group means
results$diagnosticplotResidual plots and assumption checking
results$meansplotGroup means with confidence intervals
results$interpretationClinical context and interpretation guidelines

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$descriptives$asDF

as.data.frame(results$descriptives)

Examples

data('ToothGrowth')

advancedanova(data = ToothGrowth,
             dependent = len,
             fixed = supp)