test_anova
Run ANOVA (one-way, factorial, repeated measures, ANCOVA, mixed) with effect sizes, Levene's test, and post-hoc comparisons via estimated marginal means.
Instructions
ANOVA in all its usual forms, with effect sizes (eta squared, partial eta squared, omega squared), Levene's test and post-hoc comparisons via estimated marginal means.
one-way / factorial:
dvplusbetween=['factor1','factor2']ANCOVA: add
covariates=['age']repeated measures:
within=['time']plusid='subject'(data must be in long format)mixed: both
betweenandwithin, plusid
Set nonparametric=true for Kruskal-Wallis (between) or Friedman (within) with post-hoc tests, and welch=true for a Welch ANOVA when variances differ. The fitted model is saved for use with model_diagnostics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dv | Yes | Numeric dependent variable. | |
| id | No | Participant identifier column, required for within-subjects designs. | |
| data | Yes | Dataset name in the session. | |
| type | No | Sum-of-squares type: 2 or 3. Type 3 matches SPSS. | |
| plots | No | Include a box plot by the first factor. | |
| welch | No | Also run a Welch ANOVA (one-way between-subjects only). | |
| digits | No | Decimal places. | |
| within | No | Within-subjects (repeated measures) factor columns; requires `id`. | |
| between | No | Between-subjects factor columns. | |
| posthoc | No | Post-hoc adjustment: tukey, bonferroni, holm, sidak, fdr, or none. | tukey |
| save_as | No | Name for the fitted model in the session. | |
| covariates | No | Continuous covariates, turning the analysis into an ANCOVA. | |
| nonparametric | No | Also run Kruskal-Wallis (between) or Friedman (within). |