6.1.4 Twoway ANOVA -analysis of an experiment with two crossed factors


This statlet performs an analysis of variance for data grouped by levels of two classification factors. The tabs are:

Input

Scatterplot

ANOVA

Means table

Means plot

Range tests

Interaction plot

Resids vs level

Resids vs predict

Resids vs row

P-plot


Example

The example data describes the results of an experiment performed on 48 rats, 16 of which were given each of 3 different poisons. Within each group of 16 rats, 4 received treatment A, 4 received treatment B, 4 received treatment C, and 4 received treatment D. Their recorded survival times are shown below:


Input

Enter the name of the column containing the data to be analyzed, and the names of two columns contains level codes for the experimental factors:

Back to Top


Scatterplot

This tab shows a plot of the data values by level of a selected factor:

Note the different levels of variability amongst types of poison. This apparent heteroscedasticity could invalidate the analysis of variance and multiple range tests normally performed. Note: applying a reciprocal transformation to this data does a good job at stabilizing the variance.

Options button

Press this button to select the factor to be plotted on the X-axis:

Back to Top


ANOVA

This tab displays an analysis of variance table for the data:

The table takes the original variability among the 32 measured breaking strengths and divides it into four components:

  1. A "Type of poison" component, which measures contribution to overall variability due to differences between the levels of the first factor.
  2. A "Treatment" component, which measures contribution to overall variability due to differences between the levels of the second factor.
  3. An "Interaction" component, which measures contribution due to any interaction between the two factors. An interaction occurs when the effect of one factor depends upon the level of another.
  4. A "Residual" component, which measures the variability due to all other factors. This fourth component is sometimes referred to as the experimental error.

The P-values in the rightmost column of the table are used to determine whether significant differences exist due to the factors, and whether or not there is a significant interaction. P-values below 0.05 indicate statistically significant effects at the 5% significance level. In the above example, there are significant differences between both types of poison and between types of treatment. However, there is not a significant interaction.

Options button

Use the Options button to specify whether you wish to have an interaction included in the analysis of variance table:

Back to Top


Means table

This tab displays the mean of each level code together with uncertainty intervals:

It also shows the means at different combinations of the factors:

The uncertainty intervals bound the estimation error in the means using one of several methods, selected by pressing the Options button. The choice of intervals is described in detail in the Oneway ANOVA statlet.

Options button

Select the desired type of uncertainty intervals:

Back to Top


Means plot

This tab plots the level means with uncertainty intervals:

See the discussion under Means table for an explanation of the intervals.

Options button

Select the factor to plot on the X-axis and the desired type of uncertainty intervals:

Back to Top


Range tests

This tab indicates which means are significantly different from which others:

The output of this tab is described in the Oneway ANOVA statlet.

Options button

Select the desired factor, procedure, and level of confidence:

Back to Top


Interaction plot

This tab may be used to illustrate any significant interaction:

It plots the least squares means for each combination of the factors. If the factors do not interact, the lines should be approximately parallel.

Back to Top


Resids vs level

This tab plots the residuals by level code:

If the standard deviations within each group are the same, we should see approximately the same scatter amongst the residuals for each level. We don’t usually start to worry, however, until the standard deviations differ by more than a factor of 3 to 1 between the largest and the smallest. In this case, the plot indicates a serious problem with the current analysis. For proper interpretation of this data, you should return to the Input tab and select a reciprocal transformation using the spinner.

Options button

Back to Top


Resids vs predict

This tab plots the residuals versus predicted values of strength:

It is useful for detecting possible violations of the assumption of constant within group variability. Frequently, the variability of measurements increases with their mean. Notice how the above plot shows points falling into a funnel-shaped pattern, increasing in spread from left to right. Such observed heteroscedasticity may often be eliminated by analyzing the logarithms or reciprocals of the data rather than the original data values.

Back to Top


Resids vs row

This tab plots the residuals versus row number:

If the data were entered in time order, any pattern in the above plot would indicate changes over the course of the data collection.

Back to Top


P-plot

This tab creates a normal probability plot for the residuals:

If the residuals come from a normal distribution, the points should lie approximately along a straight line.

Back to Top