Two-way ANOVA explorer
Survival time by poison type (I, II, III) and treatment (A to D). First choose how the data are generated, then choose which model to fit. The two choices are independent, so you can fit a model that is wrong for the data and see what the diagnostics show.
Generate the data
The data-generating process: which effects are really present.
Fit a model
The model used for the ANOVA table, the fitted values and the residuals.
Where the total variability goes (faded segments are terms the model leaves out, so they end up in the residual)
| Source | SS |
|---|
Fitted model
i = poison (I, II, III), j = treatment (A to D), k = animal (1 to 4). Sum-to-zero constraints: the α’s, the β’s, and each row and column of the (αβ)’s add up to 0.
Estimates. Inner cells are the interaction terms (αβ)ij, the last column is α̂i, the last row is β̂j, the corner is μ̂. A dash means the term is not in the model.
Worked example: poison
treatment
Diagnostic plots
Residuals of the fitted model.
Residuals vs fitted values
Residuals by poison and treatment
Normal Q-Q plot
Rings in the middle plot are the mean residual of each cell: if the model fits, they sit on the zero line.