Split Plot Analysis, Step by Step
A split-plot design has two factors at two scales. The main-plot factor is hard to randomise (irrigation, tillage, machinery) so it is applied to large plots. The sub-plot factor is easier to randomise (variety, fertiliser dose) and is applied within each main plot. The analysis has two error terms, one for each scale.
Layout and randomization
Within each replicate (block), the levels of the main-plot factor A are assigned to large plots at random. Within each main plot, the levels of the sub-plot factor B are assigned to sub plots at random. The randomization is hierarchical: you do not randomise B across the whole replicate, only within each level of A. This is what makes the error structure two-tiered.
Two error term computations
Error a is computed from the main-plot residuals after fitting blocks and main-plot factor A. It is the error against which the main effect of A is tested. Error b is computed from the sub-plot residuals after fitting A, B and the A by B interaction. It is the error against which B and A by B are tested. Cochran and Cox (1957, Experimental Designs) and Gomez and Gomez (1984, Statistical Procedures for Agricultural Research) both give the explicit formulae for the SS partition.
Choosing post-hoc
Post-hoc comparisons depend on which factor you are comparing. Compare main-plot levels using error a's MS and df. Compare sub-plot levels (overall, or within a level of A) using error b's MS and df. The standard error of a difference between two main-plot means is the square root of 2 times MS_a divided by the number of sub plots per main-plot mean. The standard error for sub-plot comparisons uses MS_b. Mixing the two errors is the most common mistake in split-plot analysis.