Comparing more than two groups in SPSS

Bhanji - Statistical Methods
last edited March 27, 2024


Goals for today

Learn how to compare means of a continuous outcome from several independent groups to address the effect group on the dependent variable (modeling a continuous DV with a categorical IV). Extend this model to groups that differ on two factors (2x2 design).

Step 1 - Get organized, import data


Decision process for comparing several independent groups (from Field textbook Chapter 12)

data description:

oveis-2020-recoded-data.csv is shared data from the publication Oveis, C., Gu, Y., Ocampo, J. M., Hangen, E. J., & Jamieson, J. P. (2020). Emotion regulation contagion: Stress reappraisal promotes challenge responses in teammates. Journal of Experimental Psychology: General, 149(11), 2187.


Step 2 - descriptives

Do the following:
1. Make sure the columns that contain nominal vals are stored as nominal (emoreg_cond and direct_cond)
2. Then get descriptives (and histogram) for the DV card_out_react_prep organized by just the first IV emoreg_cond - use Analyze->Descriptive Statistics->Explore, and put the grouping variable ("emoreg_cond") in the Factor List.
- there are no missing cases in this data (this is a subset of the original dataset) but you should be mindful of missing cases when working with your own data
3. We are going to start by considering only 1 of the categorical IVs, emoreg_cond. Check the distribution shape (for a normal-ish shape) and potential outliers for the DV (histogram and boxplot)

Make note of anything noticeable you see in the data.


Step 3 - ANOVA using GLM univariate

Step 3.1: specify the model

Let's fit a model with 1 categorical predictor emoreg_cond and one continuous DV card_out_react_prep.

It is as simple as:
1. Analyze->General Linear Model->Univariate
2. card_out_react_prep as Dependent Variable
3. emoreg_cond as Fixed Factor
4. click on "Plots" and add a plot with emoreg_cond on the Horizontal Axis (be sure to click Add after you select it)
5. Click on "EM Means" and add emoreg_cond to the "Display means for:" box
6. Click on "options" and check the box for effect size estimates
7. click OK

Understanding the output :
  1. The "Tests of Between Subjects Effecs" table gives the overall model F-statistic (in the "corrected model" row), which is equal to the mean square between groups divided by the mean square within groups. In our regression examples we referred to this value more generally as the ratio of variance explained by the model to leftover error (residual variance). The F-stat is the same for the single predictor emoreg_cond because we only have one predictor
  2. The p-value for the F-stat tells you the probability of an F-statistic at least that large (mean differences that large) under the null hypothesis that there is no difference between emo_reg group means. When you report the F-stat you include the model (between groups) and residual (within groups) degrees of freedom, e.g.: F(2,231) = 9.324, p = .0001
  3. The partial eta-squared effect size can be interpreted as proportion of variance in the DV explained by the model (notice the value for the model is the same as the R-squared value below the table). When we talk about an effect of a factor with many levels this is often called the "omnibus effect" to refer to the effect across all levels of the factor.
  4. The F-stat and effect size do not tell you anything about the direction of the group effect, so we need to look at the "Mean" column in the "Estimated Marginal Means" table to see the pattern. It is immediately apparent that the mean cardiac output in the "reappraise" group is highest.

Step 3.4- check assumptions

We are using the same modeling framework that we used in linear regression, so the assumptions concerning residuals (normality and homogeneity) are the same, and we can check them the same way. In SPSS when you are specifying the model, you can click the "Save" button and you will have the option to save the model residuals, which will then appear as a new variable in the file. Once it is in the file you can explore it (normality plots) as you like.
SPSS also provides options to use statistical tests to check for unequal variance (under the Options button - we won't do that now).


Step 4 - ANCOVA - independent groups with a continuous covariate

Now that we have seen how to model a continous DV with a categorical IV, we can extend the model. The variable prepIOS_cent is closeness ratings from each participant, rating how connected they felt to the partner they interacted with. By including prepIOS_cent as a covariate, we can see what effect a the emotion regulation variable has, adjusting for the effect of the covariate (described in full in Field textbook section 13.2).
Using the same model building menu (Analyze->General Linear Model->Univariate), add prepIOS_cent in the Covariate box in the model. Keep everything else the same as before.

Understanding the output

The "Tests of Between Subjects Effects" table gives us an F-statistic for each predictor. The F-stat for the emotion regulation condition now tells us about the difference in group means, adjusting for closeness. The F-stat for closeness (prepIOS_cent) tells us about the covariance with the DV. Notice that model eta-squared (R-squared) has gone up a little (because the covariate explains some added variance), and the partial eta-squared for emoreg_cond has gone down a tiny bit because the covariate explains some of the variance that is shared by the main IV and DV.
Notice that the "estimated marginal means" are a little bit different now becuase they are adjusted for the covariate.

what do you conclude based on this model?

Step 5 - Factorial Anova

In the data description there is actually a second factor we haven't considered yet: direct_cond with two levels. This variable indicates whether a participant received instructions to regulate their emotions directly ("self"), or whether they were exposed indirectly ("other") by interacting with a partner who had received emotion regulation instructions. The design is fully crossed, so there are a total of 6 (3*2) groups. Let's examine the full design now.
We can hypothesize that there is an interaction of emoreg_cond and direct_cond such that the effect of emoreg_cond on cardiac output is greater when the instructions are received directly ("self" condition) compared to indirectly ("other" condition).

Step 5.1 - Factorial ANOVA

Let's run the full model now (DV predicted by IV1 + IV2 + IV1*IV2): 1. Go to the same Analyze->General Linear Model->Univariate menu
2. remove the covariate from the covariate box
3. add direct_cond to the Fixed Factors list
4. Click on "Model" and see that "full factorial" is pre-selected by default
5. Click Plots, and add a plot with emoreg_cond on the "horizontal axis", and direct_cond on "Separate Lines". Remove the previous plot from the list of plots.
6. click Options, verify that "effect sizes" is checked

Check out the output
  1. We get an F-stat for each of the three predictors (emoreg_cond, direct_cond and their interaction emoreg_cond:direct_cond). If we had found a significant interaction, we would infer that the effect of emotion regulation depended on whether the instructions were received directly or just by interacting with a partner who received emotion regulation instructions.
  2. We do find a significant main effect of emotion regulation condition (consistent with what we saw earlier). The column "partial eta-squared" gives an effect size for each predictor.

Step 5.3 - Simple effects


That's all for this activity!


References