# Load required packages and data
library(dplyr)
data(survey_data)
# Two-way ANOVA: income by gender and education
survey_data %>%
factorial_anova(dv = income, between = c(gender, education))
# Two-way ANOVA with weights
survey_data %>%
factorial_anova(dv = life_satisfaction, between = c(gender, region),
weights = sampling_weight)
# Three-way ANOVA
survey_data %>%
factorial_anova(dv = income, between = c(gender, region, education))
# Follow up with post-hoc tests
result <- survey_data %>%
factorial_anova(dv = income, between = c(gender, education))
result %>% tukey_test()
result %>% levene_test()
# --- Three-layer output ---
result # compact overview
summary(result) # full detailed output with all sections
summary(result, marginal_means = FALSE) # hide estimated marginal means
Run the code above in your browser using DataLab