Two-way ANOVA

Hypothesis tests · Method and input reference

Factors use numeric category codes. Factorial ANOVA includes all interactions and Type II sums of squares. ANCOVA uses outcome, group, covariate columns and common slopes. MANOVA uses outcome columns followed by one group column. Synthetic example: A balanced 2-factor study with 16 independent replicates per cell; outcome first, then numeric factor codes (0/1).

Open calculator · Compare methods in the decision matrix

When to consider it

  • Estimate main effects and interactions for two between-subjects factors.

Assumptions and scope

  • Observations must be independent between subjects; repeated rows from one subject are not independent samples.
  • Replicated, full-rank design; factor codes identify categories. Inspect residuals and interaction terms.

Two factors; use three-way ANOVA for three factors. Current ANOVA uses Type II sums of squares.

Required inputs

  • Data: outcome(s), then factor(s), then covariate for ANCOVA — Numeric observations; preserve the row and column structure described above.

Review missing values and data coding before running. Sample inputs are synthetic teaching examples.

Implementation

Lifescio validates inputs and formats results; listed functions are the principal calculation routines, not an exhaustive transitive dependency list.

  • statsmodels 0.14.4: statsmodels.formula.api.ols, statsmodels.stats.anova.anova_lm

These are pinned library versions; saved results record the versions actually used at runtime.

Library references