anova2_interpret: Two-Way ANOVA with Plain-English Interpretation

View source: R/anova2_interpret.R

anova2_interpretR Documentation

Two-Way ANOVA with Plain-English Interpretation

Description

Uses Type-2 SS by default (safe for unbalanced designs). Automatically switches to Type-3 SS when an interaction term is detected and sets the correct contrasts. Users are warned when interpreting main effects in the presence of a significant interaction.

Usage

anova2_interpret(formula, data, type = 2, conf.level = 0.95)

Arguments

formula

A formula of the form outcome ~ group1 * group2

data

A data frame containing the variables

type

ANOVA type: 2 or 3. Default is 2. Type 3 is automatically used when an interaction term is detected in the formula.

conf.level

Confidence level. Default 0.95.

Value

An object of class statease_anova2 containing two-way ANOVA results and interpretation. Use print() to display the formatted report.

Examples

df <- data.frame(
  score  = c(23,45,12,67,34,89,56,43,78,90,11,34),
  method = rep(c("Online","Traditional"), each = 6),
  gender = rep(c("Male","Female"), times = 6)
)
result <- anova2_interpret(score ~ method * gender, data = df)
print(result)

statease documentation built on June 7, 2026, 5:06 p.m.