Table 1. Means for All Four Conditions.
In contrast to a main effect which is the effect of a variable averaged across levels of another variable, the simple effect of a variable is the effect of the variable at a single level of another variable. The simple effect of “Weight” at the level of “Girl Friend” is the difference between the “Girl-Friend Typical” and the “Girl-Friend Obese” conditions. The difference is 6.19-5.65 = 0.54. Similarly, the simple effect of “Weight” at the level of “Acquaintance” is the difference between the “Acquaintance Typical” and the “Acquaintance Obese” conditions. The difference is 6.59-6.15 = 0.44.
Recall that there is an interaction when the effect of one variable differs depending on the level of another variable. This is equivalent to saying that there is an interaction when the simple effects differ. In this example, the simple effects are 0.54 and 0.44. As shown below, these simple effects are not significantly different.
Tests of Significance
The important questions are not whether there are main effects and interactions in the sample data. Instead, what is important is what the sample data allow you to conclude about the population. This is where Analysis of Variance comes it. ANOVA tests main effects and interactions for significance. An ANOVA Summary Table for these data is shown in Table 2.
Table 2. ANOVA Summary Table.
|W x R||1||0.1038||0.1038||0.062||0.8043|
Consider first the effect of “Weight.” The degrees of freedom (df) for “Weight” is 1. The degrees of freedom for a main effect is always equal to the number of levels of the variable minus one. Since there are two levels of the “Weight” variable (typical and obese) the df is 2 -1 = 1. We skip the calculation of the sum of squares (SSQ) not because it is difficult, but because it is so much easier to rely on computer programs to compute it. The mean square (MS) is the sum of squares divided by the df. The F ratio is computed by dividing the MS for the effect by the MS for error (MSE). For the effect of “Weight,” F = 10.4673/1.6844 = 6.214. The last column, p, is is the probability of getting an F of 6.214 or larger given that there is no effect of weight in the population. The p value is 0.0136 which is quite low and therefore the null hypothesis of no main effect of “Weight” is rejected. The conclusion is that the weight of the companion lowers judgments of qualifications.
The effect “Relation” is interpreted the same way. The conclusion is that being accompanied by a girl friend leads to lower ratings than being accompanied by an acquaintance.
The df for an interaction is the product of the df of variables in the interaction. For the Weight x Relation interaction (W x R), the df = 1 since both Weight and Relation have one df: 1 x 1 = 1. The p value for the interaction is 0.8043 which is the probability of getting an interaction as big or bigger than the one obtained in the experiment if there were no interaction in the population. Therefore, these data provide no evidence for an interaction. Always keep in mind that the lack of evidence for an effect does not justify the conclusion that there is no effect. In other words, you do not accept the null hypothesis just because you do not reject it.
For “Error,” the degrees of freedom is equal to the total number of observations minus the total number of groups. The sample sizes for this experiment are shown in Table 3. The total number of observations is 40 + 42 + 40 + 54 = 176. Since there are four groups, df = 176 – 4 = 172.
Table 3. Sample Sizes for All Four Conditions.
The final row is “Total.” The degrees of freedom total is equal to the sum of all degrees of freedom. It is also equal to the number of observations minus 1, or 176 -1 = 175. When there are equal sample sizes, the sum of squares total will equal the sum all other sums of squares. However, when there are unequal sample sizes, as there are here, this will not generally be true. The reasons for this are complex and are discussed in the section Unequal n.
Although the plot shown in Figure 1 illustrates the main effects and the interaction (or lack of interaction) clearly, it is called an interaction plot. It is important to carefully consider the components of this plot. First, the dependent variable is on the Y axis. Second, one of the independent variables is on the X axis. In this case, it is the variable is “Weight.” Finally, a separate line is drawn for each level of the other independent variable. It is better to label the lines right on the graph as shown here than with a legend.
Figure 1. An Interaction Plot
If you have three or more levels on the X axis, you should not use lines unless there is some numeric ordering to the levels. If your variable on the X axis is a qualitative variable, you can use a plot such as the one in Figure 2. However, as discussed in the section on bar charts, it would be better to replace each bar with a box plot.
Figure 2. Plot With a Qualitative Variable on the X-axis
Figure 3 shows such a plot. Notice how it contains information about the medians, quantiles, and minimums and maximums not contained in Figure 2. Most important, you get an idea about how much the distributions overlap from Figure 3 that you do not get from Figure 2.
Figure 3. Box plots.
Line graphs are a common option with more than two levels if the variable is numeric. Figure 4 shows an example. A line graph has the advantage of showing the pattern of interaction clearly. Its disadvantage is that it does not convey the distributional information contained in box plots.
Figure 4. Plot With a Quantitative Variable on the X-axis
An Example with Interaction
The following example was presented in the section on specific comparisons among means. It is also relevant here.
This example uses the made-up data from a hypothetical experiment shown in Table 4. Twelve subjects were selected from a population of high-self-esteem subjects and an additional 12 subjects were selected from a population of low-self-esteem subjects. Subjects then performed on a task and (independent of how well they really did) half were told they succeeded and the other half were told they failed . Therefore there were six subjects in each esteem/success combination and 24 subjects altogether.
After the task, subjects were asked to rate (on a 10-point scale) how much of their outcome (success or failure) they attributed to themselves as opposed to being due to the nature of the task.
Table 4. Data from Hypothetical Experiment on Attribution.
The ANOVA Summary Table for these data is shown in Table 5.
Table 5. ANOVA Summary Table for Made Up Data.
|O x E||1||35.0417||35.0417||21.5641||0.0002|
As you can see, the only significant effect is the Outcome x Esteem (O x E) interaction. The form of the interaction can be seen in Figure 5.
Figure 5. Interaction Plot for Made Up Data
Clearly the effect of “Outcome” is different for the two levels of Esteem: For subjects high in self esteem, failure led to less attribution to oneself then did success. By contrast, for subjects low in self esteem, failure led to more attribution to oneself than did success. Notice that the two lines in the graph are not parallel. Nonparallel lines indicate interaction. The significance test for the interaction determines whether it is justified to conclude that the lines in the population are not parallel. Lines do not have to cross for there to be interaction.
Three-factor designs are analyzed in much the same way as two-factor designs. Table 6 shows the analysis of a study described by Franklin and Cooley investigating three factors on the strength of industrial fans: (1) Hole Shape (Hex or Round), (2) Assembly Type (Stake or Spun), and (3) Barrel Shape (knurled or smooth). The dependent variable, breaking torque, was measured in foot-pounds. There were eight observations in each of the eight combinations of the three factors.
As you can see in Table 6, there are three main effect, three two-way interactions, and one three-way interaction. The degrees of freedom for the main effects are, as in a two-factor design, equal to the number of levels of the factor minus one. Since all the factors here have two levels, all the main effects have one degree of freedom. The interaction degrees of freedom are always equal to the product of the degrees of freedom of the component parts. This holds for the three-factor interaction as well as the two-factor interactions. The error degrees of freedom is equal to the number of observations (64) minus the number of groups (8) and is 56.
Table 6. ANOVA Summary Table for Fan Data.
|H x A||1||2848.89||2848.89||92.00||<0.0001|
|H x B||1||594.14||594.14||19.1865||<0.0001|
|A x B||1||135.14||135.14||4.36||0.0413|
|H x A x B||1||1396.89||1396.89||45.11||<0.0001|
A three-way interaction means that the two-way interactions differ as a function of the level of the third variable. The usual way to portray a three-way interaction is to plot the two-way interactions separately. Figure 5 shows the Barrel (knurled or smooth) x Assembly (Staked or Spun) separately for the two levels of Hole Shape (Hex or Round). For the Hex Shape, there is very little interaction with the lines being close to parallel with a very slight tendency for the effect of Barrel to be bigger for Staked than for Spun. The two-way interaction for the Round Shape is different: The effect of Barrel is bigger for Spun than for Staked. The finding of a significant three-way interaction indicates that this difference in two-way interactions is not due to chance.
Figure 6. Plot of the three-way interaction.
Formatting data for Computer Analysis
The data in Table 3 have been reformatted in Table 7. Note how there is one column to indicate the level of outcome and one column to indicate the level of esteem. The coding is as follows:
Low self esteem: 2
Table 7. Attribution Data Reformatted.
To use Analysis Lab to do the calculations, you would copy the data and then
1. Click the “Enter/Edit User Data” button (You may be warned that for security reasons you must use the keyboard shortcut for pasting data).
2. Paste your data.
3. Click “Accept Data”
4. Click the “Advanced” button next to the “Anova button.”
5. Select “attrib” as the dependent variable and both outcome and esteem as “group” variables.
6. Click the “do ANOVA button.”