Analysis of variance for a Latin square (source code)

= Analysis of variance for a Latin square

For one response per cell in an order-$q$ <Latin square>, fit an <intercept> and additive row, column and <treatment> effects with sum-to-zero constraints. Each factor contributes $q-1$ <statistical degrees of freedom>; the residual has $q^2-1-3(q-1)=(q-1)(q-2)$. The centered factor spaces are mutually <orthogonal>, so sequential sums of squares do not depend on fitting order. With an additional <orthogonal> symbol factor from a <Graeco-Latin square>, residual <statistical degrees of freedom> become $(q-1)(q-3)$. Exact <F-tests> require independent equal-variance <normal> errors; unmodeled <interactions> can invalidate the error term.