# The general linear model: factorial designs

## Overview

This tutorial is one of a series that accompanies Discovering Statistics Using IBM SPSS Statistics (Field 2017) by me, Andy Field. These tutorials contain abridged sections from the book (so there are some copyright considerations).1

• Who is the tutorial aimed at?
• Students enrolled on my Discovering Statistics module at the University of Sussex, or anyone reading my textbook Discovering Statistics Using IBM SPSS Statistics (Field 2017)
• What is covered?
• This tutorial develops the material from the previous tutorial to look at comparing means using IBM SPSS Statistics when the GLM contains more than one categorical predictor. We also explore interaction terms.
• This tutorial does not teach the background theory: it is assumed you have either attended my lecture or read the relevant chapter in my book (or someone else's)
• The aim of this tutorial is to augment the theory that you already know by guiding you through fitting linear models using IBM SPSS Statistics and asking you questions to test your knowledge along the way.
• The main tutorial follows the example described in detail in Field (2017), so there's a thorough account in there.
• You can access free lectures and screencasts on my YouTube channel
• There are more statistical resources on my website www.discoveringstatistics.com

## Beer goggles

The main example in this tutorial is from Field (2017), who uses an example of an experimental design with two independent variables (a two-way independent design). The study tested the prediction that subjective perceptions of physical attractiveness become inaccurate after drinking alcohol (the well-known beer-goggles effect). The example is based on research by X. Chen et al. (2014) who looked at whether the beer-goggles effect was influenced by the attractiveness of the faces being rated. The logic is that alcohol consumption has been shown to reduce accuracy in symmetry judgements, and symmetric faces have been shown to be rated as more attractive. If the beer-goggles effect is driven by alcohol impairing symmetry judgements then you’d expect a stronger effect for unattractive (asymmetric) faces (because alcohol will affect the perception of asymmetry) than attractive (symmetric) ones. The data we’ll analyse are fictional, but the results mimic the findings of this research paper.

An anthropologist was interested in the effects of facial attractiveness on the beer-goggles effect. She selected 48 participants who were randomly subdivided into three groups of 16: (1) a placebo group drank 500 ml of alcohol-free beer; (2) a low-dose group drank 500 ml of average strength beer (4% ABV); and (3) a high-dose group drank 500 ml of strong beer (7% ABV). Within each group, half (n = 8) rated the attractiveness of 50 photos of unattractive faces on a scale from 0 (pass me a paper bag) to 10 (pass me their phone number) and the remaining half rated 50 photos of attractive faces. The outcome for each participant was their median rating across the 50 photos (These photographs were from a larger pool of 500 that had been pre-rated by a different sample. The 50 photos with the highest and lowest ratings were used.). The data are in the file goggles.sav, which contains the variables FaceType (0 = unattractive, 1 = attractive), Alcohol (0 = placebo, 1 = low dose, 2 = high dose) and Attractiveness (the median rating of each participant out of 10) - see Figure 1. Figure 1: goggles.sav

## Fitting the model using SPSS Statistics

Like the previous tutorial we will use the Analyze > General Linear Model > Univariate... menu to fit the model. The following video shows how. ## Interpreting factorial designs

If you’re a Levene’s test kind of person (which I’m not) and selected that option then you'll see it in your output. With eight participants in each group this test will be horrifically underpowered so the fact that the result is non-significant (p = 0.625) could mean that the variance in attractiveness ratings is roughly equal across the combinations of type of face and alcohol, or it could be that we don’t have enough power to detect differences in the variance across groups. Output 1

### The main effect of type of face

Output 1 tells us whether any of the predictors/independent variables had a significant effect on attractiveness ratings.

### Explanation

We can visualize this effect by plotting the average attractiveness rating at each level of type of face (ignoring the dose of alcohol completely). The graph shows that the main effect reflects the fact that average attractiveness ratings were higher for the photos of attractive faces than unattractive ones. Of course, this result is not at all surprising because the attractive faces were pre-selected to be more attractive than the unattractive faces. This result is a useful manipulation check though: our participants, other things being equal, found the attractive faces more attractive than the unattractive ones.

## Warning: fun.y is deprecated. Use fun instead. ### The main effect of alcohol

Output 1 also tells us whether there was a significant main effect of the amount of alcohol drunk before rating the pictures.

### Explanation

The best way to understand this effect is to plot the average attractiveness rating at each level of alcohol (ignoring the type of face completely). The mean attractiveness ratings increase quite linearly as more alcohol is drunk. This significant main effect is likely to reflect this trend. Looking at the error bars (95% confidence intervals) there is a lot of overlap between the placebo and low-dose groups (implying that these groups have similar average ratings) but the overlap between the placebo and high-dose group is less, and quite possibly within what you’d expect from a significant difference. The confidence intervals for the low- and high-dose group also overlap a lot, suggesting that these groups do not differ. Therefore, we might speculate based on the confidence intervals that this main effect reflects a difference between the placebo and high-dose groups but that no other groups differ. It could also reflect the linear increase in ratings as the dose of alcohol increases.

## Warning: fun.y is deprecated. Use fun instead. ### Contrasts for the main effect of alcohol Output 2

### Explanation

Output 2 shows the Helmert contrasts on the effect of alcohol. The top of the table shows the contrast for Level 1 vs. Later, which in this case means the placebo group compared to the two alcohol groups. This contrast tests whether the mean of the placebo group (4.938) is different from the mean of the low- and high-dose groups combined ((5.688 + 6.375)/2 = 6.032). This is a difference of −1.094. The value of Sig. (0.004) tells us that this difference is significant because it is smaller than the criterion of 0.05. The confidence interval for this difference also doesn’t cross zero so, assuming this sample is one of the 95 out of 100 that produce a confidence interval containing the true value of the difference, the real difference between the placebo and alcohol groups is not zero (between −1.817 and −0.371, to be precise). We could conclude that the effect of alcohol is that any amount of alcohol increases the attractiveness ratings of pictures compared to when a placebo was drunk. However, we need to look at the remaining contrast to qualify this statement.

The bottom of the table shows the contrast for Level 2 vs. Level 3, which compares the mean of the low-dose group (5.688) to the mean of the high (6.375). This is a difference of −0.687. This difference is not significant (because Sig. is 0.104, which is greater than 0.05). The confidence interval for this difference also crosses zero so, assuming this sample is one of the 95 out of 100 that produced confidence intervals that contain the true value of the difference, the real difference is between −1.522 and 0.0147 and could be zero. This contrast tells us that having high dose of alcohol doesn’t significantly affect attractiveness ratings compared to having a low dose.

### Post hoc tests for the main effect of alcohol Output 3

### Explanation

The Bonferroni post hoc tests (Output 3) break down the main effect of alcohol and can be interpreted as if Alcohol were the only predictor in the model (i.e., the reported effects for alcohol are collapsed with regard to the type of face). The tests show (both by the significance and whether the bootstrap confidence intervals cross zero) that when participants had a high dose of alcohol their ratings of faces were significantly higher than those who had a placebo drink (p = 0.004) but not than those who had a low dose of alcohol (p = 0.312), and that ratings were not significantly different between those who had a low dose of alcohol and those in the placebo group (p = 0.231).

## The FaceType × Alcohol interaction

Finally, Output 1 (reproduced below) tells us about the interaction between the effect of type of face and the effect of alcohol. The F-statistic is highly significant (because the observed p-value of 0.001 is less than 0.05). Output 1

### Explanation

The output will include the (probably badly scaled) plot that we asked for, but I've produced a nicer graph that shows the estimated marginal means from Output 4. We can use this graph to get a handle on the interaction effect. Focus first on the blue line, which is flat and shows very little difference in average attractiveness ratings across the alcohol conditions. This line shows that when rating attractive faces, alcohol has very little effect. Now look at the orange line, which slopes upwards, showing that when rating unattractive faces ratings increase with the dose of alcohol. This line shows that when rating unattractive faces, alcohol has an effect. The significant interaction reflects the differing effect of alcohol when rating attractive and unattractive faces; that is, that alcohol has an effect on ratings of unattractive faces but not for attractive ones.

## Warning: fun.y is deprecated. Use fun instead.
## fun.y is deprecated. Use fun instead.  Output 4

## Unguided example Let's look at a second example from Field (2017). A researcher was interested in what factors contributed to injuries resulting from game console use. She tested 40 participants who were randomly assigned to either an active or static game (Game) played on either a Wii or Xbox Kinect (Console). At the end of the session their physical condition was evaluated on an injury severity scale (InjurySeverity) ranging from 0 (no injury) to 20 (severe injury). The data are in the file wii_vs_xbox_injuries.sav, which contains the variables Game (0 = static, 1 = active), Console (0 = Wii, 1 = Xbox), and InjurySeverity (a score from 0 to 20). Fit a model to see whether injury severity is significantly predicted from the type of game, the type of console and their interaction.

Quiz

## Next tutorial

The next tutorial will look at analysing repeated measures designs using the general linear model.

## References

Chen, X., X. Y. Wang, D. Yang, and Y. G. Chen. 2014. “The Moderating Effect of Stimulus Attractiveness on the Effect of Alcohol Consumption on Attractiveness Ratings.” Journal Article. Alcohol and Alcoholism 49 (5): 515–19. doi:10.1093/alcalc/agu026.

Field, Andy P. 2017. Discovering Statistics Using Ibm Spss Statistics: And Sex and Drugs and Rock ’N’ Roll. Book. 5th ed. London: Sage.

1. This tutorial is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, basically you can use it for teaching and non-profit activities but not meddle with it.