Does the mean rise evenly with the levels? (trend analysis, linear and quadratic trend)
In brief
If the groups are ordered levels, such as doses or practice hours, the question about the course is worth more than all pairs. The trend analysis splits it into a linear trend (even rise or fall), a quadratic trend (one bend) and further ones. Each trend is a contrast with fixed weights.
An example by hand
Four groups of 8 people each practise 0, 1, 2 or 3 hours per week. Means: 10, 14, 15 and 17. Error variance: 12. With four equally spaced levels the linear trend has the weights −3, −1, +1, +3.
- Contrast sum: (−3) · 10 + (−1) · 14 + 1 · 15 + 3 · 17 = 22.
- Standard error: square root of (12 · 20 : 8) = square root of 30 = 5.48; t = 22 : 5.48 = 4.02.
- Sum of squares of the trend: 22² : (20 : 8) = 193.6. The sum of squares between the groups is 8 · 26 = 208. The linear trend explains 193.6 : 208, so about 93% of the difference between the groups.
- Quadratic trend (weights +1, −1, −1, +1): contrast sum 10 − 14 − 15 + 17 = −2, t = −0.82. The bend is hardly more than chance.
When does a trend make sense?
- The levels are ordered (dose, time, hours), and the order of the groups in the data matches this order.
- With equal spacing fixed weights apply; with unequal spacing (for example 0.5, 1 and 4 hours) the true numbers are used as spacing.
- With equal group sizes the trends are independent of each other (orthogonal) and divide the spread between the groups among themselves.
How it works in Statable
- Open the example "Nitrate in water" and look at the analysis "Comparing three areas". The areas are ordered by increasingly intensive use; the order of the groups decides what a trend means.
- Below the result of the analysis of variance open "Planned comparisons (contrasts) and trend analysis" and look at the trend analysis section.
- Choose "Equal spacing" or, if all groups are named by numbers, "True spacing". Statable shows weights, estimate, standard error, t, p and the share of the spread between the groups for each trend.
What is often misunderstood
For specialists
Orthogonal polynomial contrasts for equal spacing: linear (−3, −1, 1, 3), quadratic (1, −1, −1, 1), cubic (−1, 3, −3, 1) with four levels. With unequal spacing the polynomials are orthogonalised from the true level values. With k levels at most k − 1 trends are possible; polynomials of the third order and higher can rarely be justified in terms of subject matter.
Sources
Maxwell, S. E. & Delaney, H. D. (2004). Designing Experiments and Analyzing Data (2nd ed.), chapter on trend analyses. Dormann, C. F. Parametrische Statistik (on the choice of polynomials).
Take away
- With ordered levels the trend analysis asks about the course instead of all pairs.
- Linear with four equally spaced levels: weights −3, −1, +1, +3; quadratic: +1, −1, −1, +1.
- The share of a trend = its sum of squares divided by the sum of squares between the groups.
- A trend needs a real order of the levels and the matching order in the data.