Comparing Means of More than Two Groups

Two simple SPSS procedures are available when the means of more than two groups have to be compared; both procedures have their own merits. Procedure MEANS computes a statistic (eta²) that indicates the amount to which the variance in the dependent variable is accounted for by the differences between the groups. Procedure ONEWAY allows to define a priori contrasts between groups and also computes a posteriori tests for significance. I think the examples are largely self-explaining, at least for users with some knowledge about analysis ofvariance!

Example for procedure MEANS:

MEANS TABLES = income BY status

Procedure MEANS with more than one grouping variable:

MEANS TABLES = income BY status BY gender

This will compare the means of the income of men and women for each (occupational) status group. That is, a table will be produced that first displays the incomes of men and women for the first status group, then for the second, and so on. In other words: The hiearchy of variables nested with "BY" works exactly the other way round when compared to the CROSSTABS procedure. Note that the ANOVA performed is the same as in the simple analysis above; in other words, two-way (or higher) analyses of variance are not available with this procedure.

Example for procedure ONEWAY with a priori contrasts:

ONEWAY anxiety BY drug (1,3)
  /CONTRAST 1 0 -1

NOTE: The numbers in parentheses after drug indicate the range of values that are supposed to enter the analysis. They may refer to all values of the BY variable, or to a subset of these values. In newer versions of SPSS (starting with version 9 or 10) this is no longer valid, i. .e the parentheses are ignored and the analysis is performed with all values of the BY variable.

Example for procedure ONEWAY with a posteriori comparisons:

ONEWAY anxiety BY drug (1,3)

NOTE: As of version 7, a-posteriori contrast are available also with keyword POSTHOC (instead of RANGES). The number of posthoc tests has increased by a large amount; I cannot go into the details here. See also note above on the range of the BY variable.

Analysis of variance with two or more factors, covariates, or more than one dependent variable

SPSS offers several procedures for complex analyses of variance: ANOVA, UNIANOVA, GLM and MANOVA. Regrettably, these are not covered by this guide.

© W. Ludwig-Mayerhofer, IGSW | Last update: 20 Jan 2012