askvity

What is the Contrast Analysis of Variance?

Published in Statistical Analysis 5 mins read

A contrast analysis of variance (ANOVA) is a statistical technique used to test specific hypotheses about differences between group means after a significant overall ANOVA result has been obtained, or instead of an overall ANOVA when specific hypotheses are planned in advance. It allows researchers to examine pre-planned comparisons between group means, rather than simply determining if there is any difference between groups as the standard ANOVA F-test does.

Understanding the Difference: ANOVA vs. Contrast Analysis

The standard ANOVA is an omnibus test. It answers the question: "Is there a statistically significant difference among the means of the groups?" If the F-test is significant, it only tells us that at least two group means are different. It does not tell us which specific groups differ from each other.

Contrast analysis, on the other hand, allows us to test focused hypotheses. For example:

  • Is the mean of group A significantly different from the mean of group B?
  • Is the average of groups A and B significantly different from the average of groups C and D?
  • Is group A significantly different from the average of all other groups?

Key Concepts in Contrast Analysis

  • Contrasts: A contrast is a specific comparison between two or more group means. It's defined by a set of coefficients (weights) that are applied to each group mean. These coefficients must sum to zero.

  • Contrast Coefficients: These are the weights assigned to each group mean in the contrast. The sign and magnitude of the coefficient determine the direction and strength of the comparison. For example, to compare group 1 to group 2, you could assign a coefficient of +1 to group 1 and -1 to group 2, and 0 to all other groups.

  • Orthogonal Contrasts: Contrasts are orthogonal if they are independent of each other. Orthogonality means that the contrasts are testing completely different hypotheses and do not overlap. For k groups, a maximum of k-1 orthogonal contrasts can be performed. If contrasts are orthogonal, the sums of squares for each contrast will add up to the treatment sum of squares in the ANOVA.

How Contrast Analysis Works

  1. Define Hypotheses: Before conducting the analysis, specify the hypotheses you want to test. These hypotheses should be driven by theory or prior research.

  2. Assign Contrast Coefficients: Based on your hypotheses, assign appropriate contrast coefficients to each group. Remember, the coefficients must sum to zero.

  3. Calculate the Contrast Sum of Squares: A specific formula is used to calculate the sum of squares for the contrast (SScontrast). This formula uses the group means, sample sizes, and contrast coefficients.

  4. Calculate the Contrast F-statistic: The F-statistic for the contrast is calculated by dividing the mean square for the contrast (MScontrast = SScontrast/dfcontrast) by the error mean square (MSerror) from the overall ANOVA. The degrees of freedom for the contrast (dfcontrast) is always 1.

  5. Evaluate Statistical Significance: Compare the calculated F-statistic to a critical F-value with 1 and the error degrees of freedom from the overall ANOVA. If the F-statistic exceeds the critical value, the contrast is statistically significant.

Example

Suppose we have four groups (A, B, C, D) and we want to test two hypotheses:

  • Hypothesis 1: Is the average of groups A and B different from the average of groups C and D?
  • Hypothesis 2: Is group A different from group B?

The contrast coefficients would be:

Group Contrast 1 (A&B vs. C&D) Contrast 2 (A vs. B)
A +1 +1
B +1 -1
C -1 0
D -1 0

Notice that the coefficients in each contrast sum to zero. Also, notice that these contrasts would be orthogonal. To check this, multiple the coefficients for each group across contrasts, and then sum the products. In this case, (+1)(+1) + (+1)(-1) + (-1)(0) + (-1)(0) = 1 - 1 + 0 + 0 = 0. Because this value is zero, the contrasts are orthogonal.

Advantages of Contrast Analysis

  • Increased Statistical Power: Contrast analysis is often more powerful than post-hoc tests because it tests specific, pre-planned hypotheses.

  • Focused Comparisons: It allows researchers to address specific research questions more directly than an omnibus ANOVA.

  • Avoidance of Multiple Comparison Problems: When using orthogonal contrasts, the problem of inflated Type I error rates (false positives) due to multiple comparisons is reduced.

When to Use Contrast Analysis

  • When you have specific hypotheses about group differences before conducting the study.
  • After a significant ANOVA to explore specific group differences in more detail.
  • When you want to test non-pairwise comparisons (e.g., comparing the average of several groups to another group).

Contrast analysis is a valuable tool for researchers who want to go beyond the general question of whether groups differ and instead test specific, theory-driven hypotheses about group differences.

Related Articles