Why the Covariate’s Zero Point Matters
In ANCOVA, an adjusted mean is a model-based mean for a treatment group at a specified covariate value. The value zero is sometimes a convenient reference point, but it may not be meaningful in context. For example, zero might represent a baseline score that no participant had. Centering the covariate gives zero a more useful interpretation, such as the sample’s baseline average.
Changing the zero point changes how the model’s intercept and reference-point means are reported. It does not change the fitted response for any observation, or the difference between two treatment groups evaluated at the same covariate value. The key is to distinguish a change of coordinates from a change in the value at which groups are compared.
The Common-Slope Model and Centering
Suppose there are \(k\) treatment groups and one quantitative covariate \(x\). Use group 1 as the reference group, and let \(I_{ij}=1\) when observation \(i\) is in group \(j\), and \(0\) otherwise. The common-slope ANCOVA model is
Here, \(\beta_0\) is the model mean for group 1 at \(x=0\), \(\tau_r\) is the difference between group \(r\) and group 1 at a shared covariate value, and \(\beta_1\) is the common change in the mean response for a one-unit increase in \(x\). The model assumes a linear mean relationship with the same slope in every group. For standard model-based inference, it also assumes independent errors with mean zero and constant variance; normal errors are additionally used for exact small-sample inference.
To center \(x\) at a chosen value \(c\), define \(z=x-c\). Thus \(z=0\) corresponds to the original covariate value \(x=c\). Substituting \(x=z+c\) into the model gives the central algebraic result.
The same reasoning works for a comparison between any two groups. Their model means at covariate value \(x\) have the same \(\beta_1x\) term, so it cancels when one mean is subtracted from the other. Centering changes the way the shared covariate value is written, not that difference.
Why the Fitted Values Do Not Change
Centering is a re-expression of the same model, not a new restriction on the data. Each set of coefficients in the original model has a corresponding set in the centered model: keep the slope and treatment coefficients the same, and add \(\beta_1c\) to the intercept. Conversely, subtract \(\beta_1c\) from the centered intercept to recover the original one. The two parameterizations can therefore produce exactly the same set of possible fitted values.
For any observation, the centered model’s fitted value is
Because the fitted values are unchanged for every observation, the residuals—the observed values minus their fitted values—are unchanged as well. Least squares therefore has the same residual sum of squares in either parameterization. This algebra does not depend on the error distribution; the model assumptions matter when interpreting the model or conducting inference, not for the identity between these two expressions.
Worked Example: Re-centering a Two-Group Model
Consider a hypothetical common-slope model for a response measured in points, with covariate \(x\) measured in baseline points. Suppose the fitted model is \(\widehat{Y}=10+4I_B+2x\), where group A is the reference group and \(I_B=1\) for group B. Assume independent observations and that a linear common-slope model is appropriate; the example is about interpreting the fitted model, not testing these assumptions.
At the original reference point \(x=0\), the fitted means are 10 points for group A and \(10+4=14\) points for group B. Now center at \(c=5\), so \(z=x-5\), or \(x=z+5\). Substitution gives
The new intercept is \(10+(2)(5)=20\) points. It is group A’s fitted mean at the original value \(x=5\), not at the original value \(x=0\). Group B’s fitted mean at \(z=0\), which also means \(x=5\), is \(20+4=24\) points.
For an observation in group B with \(x=7\), the original expression gives \(10+4+(2)(7)=28\) points. Since \(z=7-5=2\), the centered expression gives \(20+4+(2)(2)=28\) points. The group difference at either value of \(x\) is \(4\) points.
Adjusted Means at a Reference Point
The adjusted mean for group \(j\) at covariate value \(a\) is the model-predicted mean for that group when the covariate is set to \(a\). With group 1 as the reference, this is \(\beta_0+\tau_j+\beta_1a\), where \(\tau_1=0\). After centering at \(c\), the same mean is \(\beta_0^*+\tau_j+\beta_1(a-c)\). These expressions agree because \(\beta_0^*=\beta_0+\beta_1c\).
If a report gives the adjusted means at zero on the centered scale, it is reporting means at \(x=c\) on the original scale. Those reported values can differ from the means previously reported at \(x=0\), because they refer to a different covariate value. But if both models are asked for means at the same actual value \(x=a\), they give the same result.
Worked Example: Fitting the Same Model Before and After Centering
Suppose a hypothetical data set contains the following response values, measured in points. The covariate \(x\) is a baseline score measured in points.
| Group | \(x\) | \(Y\) |
|---|---|---|
| A | 0 | 9 |
| A | 1 | 14 |
| A | 2 | 13 |
| B | 0 | 13 |
| B | 1 | 18 |
| B | 2 | 17 |
For this illustration, assume the observations are independent and use a linear common-slope model. The two groups have the same pattern across the three covariate values: group B’s response is 4 points higher at each value. To find the least-squares common slope, each group has mean \(x=1\). The group mean responses are 12 and 16 points, so the within-group centered cross-products and squared deviations are
Thus the common slope estimate is \(8/4=2\) response points per baseline point. Group A’s fitted value at \(x=0\) is its mean response at \(x=1\), minus one slope unit: \(12-2=10\). The group B coefficient is its mean response minus group A’s, \(16-12=4\). The fitted model is therefore \(\widehat{Y}=10+4I_B+2x\).
Now center at \(c=1\), so \(z=x-1\). The transformed model is \(\widehat{Y}=12+4I_B+2z\), since the new intercept is \(10+(2)(1)=12\). For the group A observation at \(x=0\), the original model gives \(10+2(0)=10\), and the centered model gives \(12+2(-1)=10\). For the group B observation at \(x=2\), the original model gives \(10+4+2(2)=18\), and the centered model gives \(12+4+2(1)=18\). The same equality holds for every row.
At \(x=1\), the adjusted means are 12 points for group A and 16 points for group B; this is \(z=0\) after centering. At \(x=0\), they are 10 and 14 points, respectively. Moving the reference point changes both group means, but their difference remains 4 points.
Contrasts Are Invariant at a Shared Covariate Value
For groups \(j\) and \(\ell\), their adjusted mean difference at \(x=a\) is
After centering at \(c\), the difference is \((\beta_0^*+\tau_j+\beta_1(a-c))-(\beta_0^*+\tau_\ell+\beta_1(a-c))\), which also equals \(\tau_j-\tau_\ell\). This cancellation relies on comparing groups at the same covariate value and on the common-slope model. If the groups had different slopes, the covariate contribution would not cancel in this way.
Worked Example: Three Groups and Two Reference Points
Suppose a hypothetical three-group common-slope model, with response in millimetres and covariate \(x\) measured in baseline millimetres, has fitted equation \(\widehat{Y}=30-3I_B+5I_C+0.8x\). Group A is the reference group. Assume independent observations and a suitable linear relationship with a shared slope; these stipulated conditions let us focus on the change of coordinates.
At \(x=10\), the fitted means are \(30+0.8(10)=38\) mm for group A, \(30-3+0.8(10)=35\) mm for group B, and \(30+5+0.8(10)=43\) mm for group C. Centering at \(c=10\) gives \(z=x-10\) and
The intercept is now 38 mm, group A’s fitted mean at \(x=10\). The adjusted means at \(z=0\) are 38, 35, and 43 mm, as before at that same actual value. Their differences are B minus A, \(-3\) mm; C minus A, \(5\) mm; and C minus B, \(43-35=8\) mm. These differences are the same at every shared covariate value in this model.
For instance, at \(x=14\), the original model gives group C a fitted mean of \(30+5+0.8(14)=46.2\) mm. Here \(z=4\), and the centered model gives \(38+5+0.8(4)=46.2\) mm. If instead one reads the centered intercept as a mean at the original \(x=0\), one would mislabel the reference point: \(z=0\) means \(x=10\).
Common Mistake: Confusing a New Origin With a New Comparison
A frequent error is to see that adjusted means change after centering and conclude that the treatment effect changed. The mistaken reasoning is: “The means at zero are different in the recentered model, so the group comparison is different.” The correction is that zero now refers to \(x=c\), not the old \(x=0\). The means have changed because the evaluation point changed; when both models are evaluated at the same actual covariate value, their adjusted means and group differences agree.
Centering is useful when zero on the original scale is arbitrary or outside the range of interest. It can make the intercept easier to interpret—for example, as the reference group’s mean at the sample’s average baseline score. It does not improve or weaken the common-slope assumption, and it does not make a comparison at one covariate value equivalent to a comparison at another. Always state which actual covariate value the reported adjusted means represent.
Check Your Understanding
Answer each question by referring to the actual covariate value, not just to whether the centered value is zero.
- In a model with slope \(1.5\), centered at \(c=4\), by how much does the intercept change, and what does the new intercept represent?
- If two groups have a common slope, explain algebraically why their adjusted mean difference does not depend on the covariate value.
- A report gives adjusted means at \(z=0\), where \(z=x-12\). At what value of the original covariate are those means evaluated?
- Why are fitted values unchanged when a covariate is centered, even though the intercept changes?
- What is the error in saying that different adjusted means at zero before and after centering prove that the treatment comparison changed?