Statistics Glossary → Contrast and custom contrast (L)
Contrast and custom contrast (L)concept
A weighted linear combination of group means or model coefficients, chosen to answer the research question directly, together with a test of whether that combination equals zero.
A contrast is written ψ = Σ cᵢ·μᵢ; for group means the coefficients must sum to zero. In a three-group study, for example, the coefficients (1, -1, 0) compare the first two groups, while (1, -0.5, -0.5) compares the first group with the average of the other two. The contrast's estimate, standard error, t statistic and confidence interval are computed. In regression and mixed models the same idea is set up on the coefficients as the hypothesis L·β = 0; when several rows are tested together, a joint F (or Wald) test is used.
Planned contrasts are specified before looking at the data, from questions derived from theory, and can be interpreted directly without first requiring a significant omnibus F test. Mutually orthogonal contrasts split the between-groups sum of squares without overlap. When many contrasts are tested, or when they are chosen after inspecting the data, a multiple-comparison correction (e.g. Bonferroni, Scheffé) is needed. Because the coding scheme (dummy or effect coding) changes what the coefficients mean, the rows of L must be written accordingly.
An everyday example
A café tries three set-ups: no promotion, a discount, and a discount plus a free dessert. If the real question is 'does any promotion raise sales?', the contrast (−1, 0.5, 0.5) compares the no-promotion mean with the average of the two promotions. The question 'does adding the dessert bring extra benefit?' is answered by the contrast (0, −1, 1).
In MerQur
It is entered as 'Planned contrasts (coefficient list)' in One-Way ANOVA, and as the 'Custom contrast (L)' parameter in Two-Way ANOVA, ANCOVA, Instrumental Variables Regression (2SLS) and Weighted Linear Regression. Logistic, Poisson / Negative Binomial Regression and Linear Mixed Models also have 'Custom contrast (L)'; Repeated Measures and Mixed-Design ANOVA give polynomial contrasts, the Weighted Mean, Frequency and Total analyses give 'Differences between domains (contrasts)', and Mediation Analysis gives pairwise contrasts between indirect effects.
Analyses where this concept appears
One-Way ANOVATwo-Way ANOVARepeated Measures ANOVAMixed-Design ANOVA, Split-PlotANCOVALogistic RegressionPoisson / Negative Binomial Regression (Count Regression)Linear Mixed Models (LMM)Instrumental Variables Regression (2SLS)Weighted Mean (Survey Means)Weighted Frequency (Survey Freq)Weighted Total (Survey Total)Weighted Linear Regression (Survey Regression)Mediation Analysis
Related concepts
Polynomial (trend) contrastsPost hoc tests (pairwise comparisons)Estimated marginal means (EMM)