22 Analysis of covariance
Analysis of Covariance (ANCOVA) is a statistical method that integrates features of Analysis of Variance (ANOVA) and regression. It is designed to analyse a continuous outcome variable influenced by one or more categorical predictor variables (factors) while incorporating continuous variables, known as covariates. By accounting for the variability associated with these covariates, ANCOVA adjusts the outcome variable to a standardized value, enhancing statistical power and reducing experimental error. This adjustment is particularly valuable in experimental designs, where precise detection of treatment effects is crucial.
A well-designed experiment minimizes experimental error to detect significant differences among treatments. While blocking is commonly employed for this purpose, it may not fully address variability arising from unpredictable factors. ANCOVA provides an additional layer of control by incorporating covariates with known functional relationships to the primary outcome variable. This reduces variability among experimental units and isolates the effects of treatments.
22.1 Applications in experimental design
ANCOVA is widely applied in experimental studies to adjust for variability. For example, in animal feeding trials, initial differences in body weight can influence final weight measurements. Using initial body weight as a covariate allows adjustments to final weights, simulating a scenario where all animals started with identical weights. A measured source of plot variation may be used as a covariate if it is appropriate to the scientific question and is not itself affected by the treatments. Adjustment to zero damage would also require support in the observed covariate range; ANCOVA does not automatically reconstruct yields in the absence of damage.
The effective application of ANCOVA requires measuring both the primary outcome variable and one or more covariates. Additionally, there must be a known functional relationship, often assumed to be linear between the covariates and the outcome variable. For instance, pre-treatment measurements of soil fertility can be used to adjust yield comparisons. Weed incidence measured after treatment may itself be affected by variety or management; adjusting for it can change the treatment effect being estimated and requires particular care. While the technique accommodates multiple covariates and nonlinear relationships, a single linear covariate often suffices for most agricultural research scenarios.
22.2 ANCOVA in agricultural research
22.2.1 Error control and treatment mean adjustment
Controlling experimental error is fundamental in research, as variability among experimental units can obscure treatment effects. Blocking, a common method for error reduction, groups similar units together to minimize variability within blocks. However, unpredictable factors such as irregular soil heterogeneity or pest outbreaks may not align with blocking strategies. ANCOVA becomes particularly useful in such cases, as it adjusts the primary outcome variable based on measurable covariates related to the variability.
For example, if soil fertility differences influence crop yield, measuring soil fertility as a covariate allows the yield data to be adjusted to a standardized fertility level. This adjustment achieves two important objectives: it recalculates treatment means to reflect a scenario without covariate differences and reduces experimental error, thereby improving the precision of treatment comparisons.
22.2.2 Comparison with blocking
Although both blocking and ANCOVA aim to reduce experimental error, their application differs. Blocking is a pre-experiment strategy that addresses predictable sources of variability, such as soil type or environmental gradients. ANCOVA performs a statistical adjustment during analysis, but suitable covariates should preferably be identified and measured before treatment application. While blocking does not require quantitative measurements, ANCOVA relies on measurable covariates with known relationships to the primary variable. Pre-treatment measurements, such as soil nutrient levels, are ideal covariates if they remain unaffected by the treatments being tested.
22.2.3 Assumptions
Analysis of covariance retains the relevant ANOVA assumptions. For the common-slope model used here:
- The conditional mean of \(Y\) is linear in the covariate within each treatment.
- The regression slope is common across treatments; a treatment-by-covariate interaction should be examined when this assumption is doubtful.
- Errors are independent, have a common variance, and are normally distributed for the usual exact tests.
- Covariates should be measured reliably and should not be consequences of the treatments when estimating total treatment effects.
- Treatment groups should have adequate overlap in covariate values, so adjusted comparisons do not depend mainly on extrapolation.
If slopes differ substantially, use a model allowing the interaction and interpret treatment differences at specified covariate values rather than imposing a common adjustment.
22.2.4 Analysis
Basically estimation of the relation between X and Y taking X as independent variable.
Removing the effects of the covariates to get adjusted treatment and error variance for Y
Estimate the values of Y as expected from a linear relation corresponding to each of the values of X.
The method of analysis of Covariance for CRD with v treatments and n experimental units and RBD with v treatments and r replications / blocks with one ancillary variable is presented below.
22.3 Analysis of covariance for CRD
Record the main character of interest (\(Y\), i.e., \(y_{ij}\)) as well as the covariate (\(X\), i.e., \(x_{ij}\)) for each of the experimental plots. The model used for the study is:
\[ y_{ij} = \mu + \tau_i + \beta x_{ij} + e_{ij} \quad i = 1, 2, ..., v; \, j = 1, 2, ..., r_i \]
Where,
\(\mu\): General mean effect
\(\tau_i\): Effect due to the \(i\)th treatment
\(\beta\): Regression coefficient of \(Y\) on \(X\)
\(e_{ij}\): Random error terms associated with each plot
\(\tau_i\) and \(\mu\) are assumed to be fixed effects.
The within-design covariate sum of squares \(E_{xx}\) must be positive, and sufficient residual degrees of freedom must remain after estimating the slope. The covariate itself need not be normally distributed; the normality assumption concerns the errors conditional on treatment and covariate. Adjustment improves precision only when the covariate supplies enough useful information to compensate for the estimated slope and any covariate imbalance.
22.3.1 Compute the sum of squares
Correction factor for \(X\): \[ \text{C.F.}(X) = \frac{(\text{Grand total for } X)^2}{n} \]
Correction factor for \(Y\): \[ \text{C.F.}(Y) = \frac{(\text{Grand total for } Y)^2}{n} \]
Correction for sum of products of \(X\) and \(Y\): \[ C.S.P.(X, Y) = \frac{(\text{Grand total for } X) \cdot (\text{Grand total for } Y)}{n} \]
Total sum of squares for \(X\): \[ G_{xx} = \sum x_{ij}^2 - \text{C.F.}(X) \]
Total sum of squares for \(Y\): \[ G_{yy} = \sum y_{ij}^2 - \text{C.F.}(Y) \]
Total sum of products for \(X\) and \(Y\): \[ G_{xy} = \sum (x_{ij} \cdot y_{ij}) - C.S.P.(X, Y) \]
Treatment Sum of Squares for \(X\): \[ T_{xx} = \text{Treatment sum of squares for } X \]
Treatment Sum of Squares for \(Y\): \[ T_{yy} = \text{Treatment sum of squares for } Y \]
Treatment Sum of Products for \(X\) and \(Y\): \[ T_{xy} = \sum_i\frac{T_{ix}T_{iy}}{r_i} - \text{C.S.P.}(X, Y) \] Where:
- \(T_{ix}\): Treatment total for \(X\) for the \(i^{th}\) treatment
- \(T_{iy}\): Treatment total for \(Y\) for the \(i^{th}\) treatment
- \(T_{ix}\): Treatment total for \(X\) for the \(i^{th}\) treatment
Error Sum of Squares for \(X\): \[ E_{xx} = \text{Error sum of squares for } X \]
Error Sum of Squares for \(Y\): \[ E_{yy} = \text{Error sum of squares for } Y \]
Error Sum of Products for \(X\) and \(Y\): \[ E_{xy} = \text{Error sum of products for } X \text{ and } Y\]
Error sums of squares or sums of products are calculated by subtracting treatment sums of squares or sums of products from total sums of squares or sums of products.
22.3.2 Analysis of covariance table (CRD)
| Source | Degrees of Freedom | Sum of Squares(\(X\)) | Sum of Squares(\(Y\)) | Sum of Products(\(X\) and \(Y\)) |
|---|---|---|---|---|
| Total | \(n-1\) | \(G_{xx}\) | \(G_{yy}\) | \(G_{xy}\) |
| Treatment | \(v-1\) | \(T_{xx}\) | \(T_{yy}\) | \(T_{xy}\) |
| Error | \(n-v\) | \(E_{xx}\) | \(E_{yy}\) | \(E_{xy}\) |
Checking treatment differences in the covariate \(X\)
This is performed using the \(F\) test:
\(F = \frac{\text{Mean Square due to treatments for } X}{\text{Mean Square due to error for } X}\)
The F-ratio is calculated as: \[F = \frac{T_{xx}/(v-1)}{E_{xx}/(n-v)}\]
A non-significant F-ratio does not prove that the covariate is unaffected by treatment. Suitability follows primarily from its timing and the study design. Association with the response is assessed by the regression test below.
Estimate of Regression Coefficient
The regression coefficient (b) of \(Y\) on \(X\) is given by:
\[ b = \frac{E_{xy}}{E_{xx}} \]Estimate of Correlation Coefficient
The correlation coefficient between the main variate and covariate is calculated as:
\[ r = \frac{E_{xy}}{\sqrt{E_{xx} \cdot E_{yy}}} \]
The magnitude of this value will indicate the linear relationship between \(X\) and \(Y\).Sum of Squares Due to Regression
The sum of squares due to regression (with 1 degree of freedom) is defined as:
\[ SS_{\text{regression}} = \frac{E_{xy}^2}{E_{xx}} \]
22.3.3 Table of adjusted values
| Source of Variation | Degrees of Freedom | Sum of Squares | Mean Sum of Squares | F Value |
|---|---|---|---|---|
| Total | \((n-2)\) | \(G_{yy}-\frac{G_{xy}^2}{G_{xx}}\)……(i) | ||
| Error | \((n-v)-1\) | \(E_{yy}-\frac{E_{xy}^2}{E_{xx}}\)……(ii) | \(\text{MSE (adj.)}\) | |
| Treatments | \((v-1)\) | (by subtraction) (i) - (ii) |
\(\text{MST (adj.)}\) | \(\frac{\text{MST(adj)}}{\text{MSE(adj)}}\) |
| Regression | \(1\) | \(\frac{E_{xy}^2}{E_{xx}}\) | \(\text{MS.Reg}\) | \(\frac{\text{MS.Reg}}{\text{MSE(adj)}}\) |
By removing the sum of squares due to regression from the error sum of squares for \(Y\), we obtain the sum of squares for residual random variation in \(Y\), called the adjusted error sum of squares. The corresponding error degrees of freedom are reduced by one.
From the analysis
The significance of the regression coefficient \(\frac{\text{MS.Reg}}{\text{MSE(adj)}}\) indicates that the covariate has an effect on the main variate, showing an association with \(Y\) after accounting for treatments. This is not by itself evidence of a causal covariate effect.
Estimate of Coefficient of Variation \(=\frac{\sqrt{\text{MSE(adj)}}}{\text{Mean of } Y} \times 100\)
The adjusted treatment means of \(Y\) are obtained assuming a linear relation between \(X\) and \(Y\);\(\bar{y_{(i,adj.)}} = \bar{y}_i - b (\bar{x}_i - \bar{x})\)
where, \(\bar{y}_i\) is the treatment mean of \(Y\); b is the regression coefficient; \(\bar{x}_i\) is the corresponding treatment mean of \(X\) and \(\bar{x}\) is the grand mean of \(X\).
When the treatments differ significantly, the pairwise comparison can be carried out by computing the critical difference (CD).
The standard error (SE) to compare a pair of treatment means with (\(r_1\)) and (\(r_2\)) replications depends on the corresponding mean values of \(X\) and can be derived as: \[
SE = \sqrt{MSE(\text{adj.}) \left[ \frac{1}{r_1} + \frac{1}{r_2} + \frac{(\bar{x_{1}} - \bar{x_{2}})^2}{ \, E_{xx}} \right]}
\]
where, \(r_1\) and \(r_2\): Replications for the two treatment means; \(x_1\) and \(x_2\): Mean values of \(X\) for the two treatment; \(MSE(\text{adj.})\): Adjusted Mean Square Error; \(E_{xx}\): Error sum of squares for the covariate
For equally replicated treatments, the square root of the average pairwise variance is: \[
SE = \sqrt{\frac{2MSE(\text{adj.})}{r} \left( 1 + \frac{T_{xx}}{(v-1) E_{xx}} \right)}
\]
where \(v\) is the number of treatments and \(r\) is their common replication. A particular pairwise comparison should use the preceding formula with its own covariate-mean difference.
The Least Significant Difference (CD) is calculated as: \[ \text{CD} = t_{\alpha/2,edf} \cdot SE \]
where, \(t_{\alpha/2,edf}\): t-value corresponding to the error degrees of freedom (n-v-1); SE: Standard error for the comparison.
Example 22.1 A greenhouse trial was conducted to study brown planthopper (BPH) damage to rice. This trial tested varying number of BPH nymphs per tiller. The main character of interest was the number of productive panicles. Tiller count made before BPH nymphs were placed on the plant is considered as covariate. Data on panicle number per hill \(Y\), initial tiller number per hill \(X\) recorded from this experiment are given below
| Treatments | \(R_1\) | \(R_2\) | \(R_3\) | \(R_4\) | Total \(Y\) | Total \(X\) | ||||
| Y | X | Y | X | Y | X | Y | X | |||
| 0.0 | 5 | 5 | 12 | 12 | 11 | 11 | 5 | 8 | 33 | 36 |
| 0.1 | 7 | 7 | 9 | 9 | 14 | 8 | 9 | 8 | 39 | 32 |
| 0.2 | 9 | 9 | 5 | 5 | 12 | 12 | 5 | 7 | 31 | 33 |
| 0.5 | 7 | 6 | 10 | 10 | 6 | 8 | 8 | 8 | 31 | 32 |
| 1.0 | 8 | 8 | 5 | 5 | 13 | 11 | 5 | 5 | 31 | 29 |
| 10.0 | 7 | 8 | 20 | 16 | 6 | 7 | 9 | 9 | 42 | 40 |
Solution
Here, \(v=6\), \(r=4\), \(n=24\), \(\sum X=202\), and \(\sum Y=207\). The individual observations in the printed table are used throughout; calculations retain full precision until the displayed results are rounded.
\[CF_X=\frac{202^2}{24}=1700.166667,\qquad CF_Y=\frac{207^2}{24}=1785.375.\]
\[CSP_{XY}=\frac{202(207)}{24}=1742.25.\]
Total sums of squares and products
\[TSS_X=\sum X_{ij}^2-CF_X=159.833333.\]
\[TSS_Y=\sum Y_{ij}^2-CF_Y=309.625.\]
\[TSCP_{XY}=\sum X_{ij}Y_{ij}-CSP_{XY}=196.75.\]
Treatment sums of squares and products
\[T_{XX}=\frac{\sum_i T_{ix}^2}{4}-CF_X=\frac{6874}{4}-1700.166667=18.333333.\]
\[T_{YY}=\frac{\sum_i T_{iy}^2}{4}-CF_Y=1814.25-1785.375=28.875.\]
\[T_{XY}=\frac{\sum_i T_{ix}T_{iy}}{4}-CSP_{XY}=\frac{7030}{4}-1742.25=15.25.\]
Error sums of squares and products
\[E_{XX}=159.833333-18.333333=141.5.\]
\[E_{YY}=309.625-28.875=280.75.\]
\[E_{XY}=196.75-15.25=181.5.\]
The within-treatment regression coefficient is
\[b=\frac{181.5}{141.5}=1.282686.\]
The regression sum of squares is
\[SSR=\frac{181.5^2}{141.5}=232.807420.\]
Adjusted error sum of squares,
\[E=280.75-\frac{181.5^2}{141.5}=47.942580.\]
The covariate-adjusted total, before fitting treatments, is
\[E_1=309.625-\frac{196.75^2}{159.833333}=67.431700.\]
Thus, the adjusted treatment sum of squares is \(E_1-E=19.489120\).
| Source | df | SS(\(XX\)) | SS(\(YY\)) | SP(\(XY\)) | Adj. SS | Adj. df | MSS | \(F_{cal}\) |
|---|---|---|---|---|---|---|---|---|
| Treatment | 5 | 18.333 | 28.875 | 15.250 | 19.489 | 5 | 3.898 | 1.382 |
| Error | 18 | 141.500 | 280.750 | 181.500 | 47.943 | 17 | 2.820 | |
| Total | 23 | 159.833 | 309.625 | 196.750 | 67.432 | 22 | ||
| Regression | 1 | 232.807 | 1 | 232.807 | 82.551 |
At the 5% level, \(F_{0.05;(5,17)}=2.810\). Since \(F_{cal}=1.382<2.810\) (p-value \(\approx0.280\)), we do not reject equality of the adjusted treatment means. There is insufficient evidence of a treatment effect after adjusting for the initial tiller-count covariate; this does not prove that the treatment means are identical.
Using \(\bar y_{i,\mathrm{adj}}=\bar y_i-b(\bar x_i-\bar x)\), the adjusted means for the six treatments, in the printed order, are approximately 7.502, 10.284, 7.964, 8.284, 9.246, and 8.469 panicles per hill.
22.4 Analysis of covariance for RBD
As in the Analysis of covariance - CRD, the main character of interest (\(Y\) i.e., \(y_{ij}\)) as well as the covariate (\(X\) i.e., \(x_{ij}\)) for each of the experimental plots.
For RBD, the model includes the effect of blocks: \[ y_{ij} = \mu + \tau_i + R_j + \beta (x_{ij} - \overline{x}) + e_{ij} ;\quad i = 1, 2, ..., v; \, j = 1, 2, ..., r \]
where, \(R_j\) represents the effect of the \(j^{th}\) block, other terms are same as that of in analysis of covariance - CRD.
The various sum of squares for each of the two variables following the standard analysis of variance procedure for RBD are:
Correction factor for \(X\): \[ \text{C.F.}(X) = \frac{(\text{Grand total for } X)^2}{n} \]
Correction factor for \(Y\): \[ \text{C.F.}(Y) = \frac{(\text{Grand total for } Y)^2}{n} \]
Correction for sum of products of \(X\) and \(Y\): \[ C.S.P.(X, Y) = \frac{(\text{Grand total for } X) \cdot (\text{Grand total for } Y)}{n} \]
Total sum of squares for \(X\): \[ G_{xx} = \sum x_{ij}^2 - \text{C.F.}(X) \]
Total sum of squares for \(Y\): \[ G_{yy} = \sum y_{ij}^2 - \text{C.F.}(Y) \]
Total sum of products for \(X\) and \(Y\): \[ G_{xy} = \sum (x_{ij} \cdot y_{ij}) - C.S.P.(X, Y) \]
Treatment Sum of Squares for \(X\): \[ T_{xx} = \text{Treatment sum of squares for } X \]
Treatment Sum of Squares for \(Y\): \[ T_{yy} = \text{Treatment sum of squares for } Y \]
Treatment Sum of Products for \(X\) and \(Y\): \[ T_{xy} = \frac{\sum_{i} (T_{ix} \cdot T_{iy})}{r} - \text{C.S.P.}(X, Y) \] where,
- \(T_{ix}\): Treatment total for \(X\) for the \(i^{th}\) treatment
- \(T_{iy}\): Treatment total for \(Y\) for the \(i^{th}\) treatment
- \(T_{ix}\): Treatment total for \(X\) for the \(i^{th}\) treatment
Block Sum of Squares for \(X\): \[ B_{xx} = \text{Block sum of squares for } X \]
Block Sum of Squares for \(Y\): \[ B_{yy} = \text{Block sum of squares for } Y \]
Block Sum of Products for \(X\) and \(Y\): \[ B_{xy} = \frac{\sum_{i} (B_{ix} \cdot B_{iy})}{v} - \text{C.S.P.}(X, Y)\] where:
- \(B_{ix}\): Total for \(X\) in the \(i^{th}\) block
- \(B_{iy}\): Total for \(Y\) in the \(i^{th}\) block
- \(B_{ix}\): Total for \(X\) in the \(i^{th}\) block
Error Sum of Squares for \(X\): \[ E_{xx} = \text{Error sum of squares for } X \]
Error Sum of Squares for \(Y\): \[ E_{yy} = \text{Error sum of squares for } Y \]
Error Sum of Products for \(X\) and \(Y\): \[ E_{xy} = \text{Error sum of products for } X \text{ and } Y \]
| Source | Degrees of Freedom | Sum of Squares (\(X\)) | Sum of Squares (\(Y\)) | Sum of Products (\(X\) and \(Y\)) |
|---|---|---|---|---|
| Blocks | \(r-1\) | \(B_{xx}\) | \(B_{yy}\) | \(B_{xy}\) |
| Treatment | \(v-1\) | \(T_{xx}\) | \(T_{yy}\) | \(T_{xy}\) |
| Error | \((r-1)(v-1)\) | \(E_{xx}\) | \(E_{yy}\) | \(E_{xy}\) |
From the above analysis we can test for the significance of the covariate X due to the treatments by the F test = Mean square due to treatments for X / Mean square due to error for X. The correlation coefficient, regression coefficient and coefficient of variation also can be obtained similar to the case of CRD.
Estimation of Adjusted values
By removing the sum of squares due to regression from the error sum of squares for Y we can obtain the sum of squares for residual random variation in Y (called as adjusted error sum of squares). The corresponding error degrees of freedom are also reduced by one. The adjusted treatment sum of squares is obtained as = (Treatment + error) adjusted for Y– Error adjusted for Y. (So the treatment degree of freedom remain unaffected).
Table of Adjusted values
| Source of variation | Degrees of Freedom | Sum of Squares | Mean Sum of Squares |
|---|---|---|---|
| Treatments + Error | \(r(v-1) - 1\) | \((T_{yy}+E_{yy})-\frac{(T_{xy}+E_{xy})^2}{(T_{xx}+E_{xx})}=E_{1}\) | |
| Error | \((r-1)(v-1) - 1\) | \(E_{yy}-\frac{ E_{xy}^2}{E_{xx}}=E\) | \(MSE_{adj} =\frac{E}{(r-1)(v-1)-1}\) |
| Treatments | \(v-1\) | \(E_{1}-E\) | \(\frac{(E_{1}-E)}{(v-1)}\) |
| Regression | \(1\) | \(\frac{E_{xy}^2}{E_{xx}}\) | \(MS.Reg\) |
The significance of the treatment effects is tested as \(F = \frac{(E_{1} - E) / (v - 1)}{MSE(adj)}\)
The significance of regression coefficient by the ratio \(F = \frac{MS(Reg)}{MSE(adj)}\)
The adjusted treatment means of \(Y\) are obtained assuming a similar linear relationship as in the case of CRD.
For the balanced RBD with a single common-slope covariate, the standard error for a particular adjusted-mean difference is
\[SE(d_{ij})=\sqrt{MSE(adj)\left[\frac2r+\frac{(\overline{x}_i-\overline{x}_j)^2}{E_{xx}}\right]}.\]
The square root of the average pairwise variance is given below. It is a summary, not a replacement for each pair-specific standard error:
\(SE = \sqrt{\frac{2MSE(adj)}{r} \cdot \left(1 + \frac{T_{xx}}{(v - 1)E_{xx}}\right)}\)
and Critical Difference
\(CD = t_{\alpha/2,edf} \cdot SE\), where the (t) value corresponds to the error degrees of freedom (r - 1)(v - 1) - 1 at a 5% level.
Example 22.2 A varietal trial on cotton was laid out in RBD with 4 replications, 7 varieties were evaluated for the yield of seed cotton. The crop stands per plots of size 30 m² were also recorded because of wide variation in plant numbers. For this calculation, assume stand is a suitable covariate and the common-slope model is appropriate. If variety affects stand, the adjusted comparison is a comparison at common stand, not the total variety effect including differences in establishment. Analyse the data on the yield of seed cotton per plot in 10 gm units \(Y\) after adjusting for plant stand \(X\).
| Variety | \(R_1\) | \(R_2\) | \(R_3\) | \(R_4\) | ||||
| X | Y | X | Y | X | Y | X | Y | |
| \(V_1\) | 114 | 42 | 88 | 21 | 140 | 51 | 137 | 32 |
| \(V_2\) | 196 | 51 | 105 | 35 | 149 | 24 | 165 | 33 |
| \(V_3\) | 139 | 30 | 110 | 21 | 115 | 20 | 107 | 25 |
| \(V_4\) | 182 | 50 | 113 | 27 | 157 | 55 | 194 | 34 |
| \(V_5\) | 126 | 36 | 125 | 27 | 98 | 36 | 147 | 24 |
| \(V_6\) | 153 | 45 | 90 | 15 | 140 | 51 | 120 | 27 |
| \(V_7\) | 175 | 45 | 97 | 19 | 135 | 48 | 189 | 24 |
Solution
| Variety | \(R_1\) | \(R_2\) | \(R_3\) | \(R_4\) | Sum \(X\) | Sum \(Y\) | ||||
| X | Y | X | Y | X | Y | X | Y | |||
| \(V_1\) | 114 | 42 | 88 | 21 | 140 | 51 | 137 | 32 | 479 | 146 |
| \(V_2\) | 196 | 51 | 105 | 35 | 149 | 24 | 165 | 33 | 615 | 143 |
| \(V_3\) | 139 | 30 | 110 | 21 | 115 | 20 | 107 | 25 | 471 | 96 |
| \(V_4\) | 182 | 50 | 113 | 27 | 157 | 55 | 194 | 34 | 646 | 166 |
| \(V_5\) | 126 | 36 | 125 | 27 | 98 | 36 | 147 | 24 | 496 | 123 |
| \(V_6\) | 153 | 45 | 90 | 15 | 140 | 51 | 120 | 27 | 503 | 138 |
| \(V_7\) | 175 | 45 | 97 | 19 | 135 | 48 | 189 | 24 | 596 | 136 |
| Total | 1085 | 299 | 728 | 165 | 934 | 285 | 1059 | 199 | 3806 | 948 |
Here, \(r=4\), \(v=7\)
Analysis of X
\(GT_X=3806\)
\(CF_X=\frac{3806^2}{28}=517344.1\)
\(T_{XX}=\frac{479^2+615^2+...+596^2}{4}-517344.1=7921.857\)
\(B_{XX}=\frac{1085^2+728^2+934^2+1059^2}{7}-517344.1=11376.71\)
\(TSS_X=114^2+196^2+...+189^2-517344.1=27107.86\)
\(Error SS (E_{XX})=27107.86-(7921.857+11376.71)=7809.286\)
Analysis of Y
\(GT_Y=948\)
\(CF_Y=\frac{948^2}{28}=32096.57\)
\(T_{YY}=\frac{146^2+143^2+...+136^2}{4}-32096.57=704.928\)
\(B_{YY}=\frac{299^2+165^2+285^2+199^2}{7}-32096.57=1825.143\)
\(TSS_Y=42^2+51^2+...+24^2-32096.57=3743.429\)
\(Error SS (E_{YY})=3743.429-(704.928+1825.143)=1213.357\)
Analysis of X and Y
\(CSP_{XY}=\frac{3806 \times 948}{4 \times 7}=128860.3\)
\(T_{XY}=\frac{(479 \times 146)+(615 \times 143)+...+(596 \times 136)}{4}-128860.3=1591.964\)
\(B_{XY}=\frac{(1085\times299)+(728\times165)+...+(1059\times199)}{7}-128860.3=2777.714\)
\(TSS_{XY}=[(114\times42)+(88\times21)+...+(189\times24)]-128860.3=5144.714\)
\(ESS_{XY}=5144.714-(1591.964+2777.714)=775.035\)
| Source | df | Sum of squares \(X\) | Sum of squares \(Y\) | Sum of products \(X,Y\) |
|---|---|---|---|---|
| Block | 3 | 11376.71 | 1825.143 | 2777.714 |
| Treatment | 6 | 7921.857 | 704.928 | 1591.964 |
| Error | 18 | 7809.286 | 1213.357 | 775.035 |
| Total | 27 | 27107.86 | 3743.429 | 5144.714 |
| Treatment + Error | 24 | 15731.14 | 1918.286 | 2367.00 |
where the Treatment + Error row gives \(T_{XX}+E_{XX}=15731.14\), \(T_{YY}+E_{YY}=1918.286\), and \(T_{XY}+E_{XY}=2367\).
Regression of Y on X, \(b=\frac{E_{XY}}{E_{XX}}=0.099\)
Sum of squares due to regression of Y on X, \(SSR_{YX}=\frac{E_{XY}^2}{E_{XX}}= 76.918\)
Correlation between X and Y, \(COR_{x,Y}=\frac{E_{XY}}{\sqrt{E_{XX}E_{YY}}}=0.251\)
Adjusted values
Adjusted error sum of squares, \(\text{Adj. ESS}_{YY}=E_{YY}-\dfrac{E_{XY}^2}{E_{XX}}=1136.438\)
Adjusted treatment + error, \((E_{YY}+T_{YY})-\dfrac{(E_{XY}+T_{XY})^2}{E_{XX}+T_{XX}}=1562.133\)
Adjusted treatment sum of squares \(= 1562.133014-1136.438410=425.694604\)
| Source | df | SS | MSS | \(F_{cal}\) | \(F_{tab}\) |
|---|---|---|---|---|---|
| Adj. Error | 17 | 1136.438 | 66.849 | ||
| Adj. (Treatment + Error) | 23 | 1562.133 | |||
| Adj. Treatment | 6 | 425.695 | 70.949 | 1.06 | \(F_{(6,17)}=2.70\) |
| Regression | 1 | 76.918 | 76.918 | 1.15 | \(F_{(1,17)}=4.45\) |
Since \(F_{cal} < F_{tab}\) for the treatments, the adjusted treatment means do not differ significantly after adjusting for the plant stand covariate.
22.5 Chapter Summary
Important formulae
For the CRD with one covariate and a common within-treatment slope:
\[Y_{ij}=\mu+\tau_i+\beta(X_{ij}-\bar X)+e_{ij}, \qquad \hat\beta=\frac{E_{xy}}{E_{xx}}\]
Here \(E_{xx}\), \(E_{xy}\) and \(E_{yy}\) are the within-treatment corrected sums of squares and products defined in the chapter, with \(E_{xx}>0\).
\[E=E_{yy}-\frac{E_{xy}^2}{E_{xx}},\qquad MSE_{adj}=\frac{E}{n-v-1}\]
With \(n\) observed responses, \(v\) treatments and one fitted covariate slope, the CRD error degrees of freedom are \(n-v-1\). For the complete RBD with \(r\) blocks, use the within-block-and-treatment quantities and error degrees of freedom \((r-1)(v-1)-1\).
\[\bar Y_{i,adj}=\bar Y_i-\hat\beta(\bar X_i-\bar X)\]
\[F_{Treatment}=\frac{(E_1-E)/(v-1)}{MSE_{adj}}\]
Here \(E_1\) is the residual sum of squares from the reduced model without treatment effects, retaining the covariate and, in RBD, the blocks. \(E\) is from the full model. The treatment comparison is therefore adjusted for the covariate.
Quick revision
- ANCOVA combines treatment comparison with regression adjustment.
- A covariate should be relevant to the response and should not be caused by the treatment being compared.
- The common-slope model assumes the same regression slope across treatments; examine treatment-by-covariate interaction.
- Independent errors, appropriate linearity and common residual variance are required for the stated model; normal errors support the usual exact tests.
- Adjustment compares treatment means at a common covariate value.
- Estimating one covariate slope uses one additional error degree of freedom.
- A useful covariate can improve precision, but improvement is not guaranteed.
- Adjustment does not turn an observational comparison into a randomized experiment.
- Use pair-specific standard errors when covariate means differ.
Fill in the blanks
Answers are given at the end of the chapter.
ANCOVA combines analysis of variance with __________.
A measured explanatory variable used for statistical adjustment is called a __________.
The common-slope ANCOVA model assumes equal regression __________ across treatments.
A covariate measured before treatment application is called a __________ covariate.
With one fitted covariate, the error degrees of freedom are reduced by __________.
The regression coefficient estimated from error sums is \(b=\) __________.
Adjusted treatment means are compared at a common covariate __________.
Under the ANCOVA model, the mean of the errors is __________.
Short-answer questions
State the additional assumptions required by the common-slope ANCOVA model.
Why is a pre-treatment covariate preferable when estimating total treatment effects?
Distinguish adjusted and unadjusted treatment means.
Why does a non-significant treatment test on the covariate not prove that it is unaffected by treatment?
Numerical and conceptual questions
Answers are given at the end of the chapter.
Given \(E_{xx}=100\), \(E_{xy}=50\), and \(E_{yy}=80\), calculate the regression coefficient and adjusted error sum of squares.
A treatment has \(\bar y_i=30\) and \(\bar x_i=12\). The grand covariate mean is 10 and the fitted slope is 2. Calculate its adjusted mean.
Answers to fill in the blanks
1. Regression 2. Covariate 3. Slopes 4. Pre-treatment 5. One 6. \(E_{xy}/E_{xx}\) 7. Value 8. Zero
Solutions to numerical and conceptual questions
The slope is \(b=50/100=0.5\). The adjusted error SS is \(80-50^2/100=55\).
The adjusted mean is \(30-2(12-10)=26\).
Fisher’s marriage of two great ideas
By the mid-1920s, Ronald A. Fisher had helped develop and apply two powerful tools in statistics: the analysis of variance, for partitioning variation among groups, and regression, for describing how one variable depends on another. Working at the Rothamsted Experimental Station amid its long-running crop trials, Fisher saw that these two ideas could be combined into a single, more powerful procedure. Field plots were never perfectly uniform, some started with more plants, richer soil, or less pest damage than others, and this “nuisance” variation muddied the comparison of treatments. Fisher’s insight was that if such a nuisance factor could be measured as a covariate, its influence could be regressed out of the response before the treatments were compared by analysis of variance.
This fusion, which he called the analysis of covariance, was presented in his 1932 edition of Statistical Methods for Research Workers and set out more fully with Frank Yates in the following years. Its beauty lies in its economy: instead of physically controlling every source of variation through elaborate blocking, the experimenter measures one or two covariates and lets the arithmetic do the adjusting. When you use the initial plant stand to adjust cotton yields, or pre-treatment body weight to adjust an animal’s final weight, you are applying exactly the tool Fisher devised, one that draws on both regression and analysis of variance. (Fisher 1932)
“To consult the statistician after an experiment is finished is often merely to ask him to conduct a post mortem examination. He can perhaps say what the experiment died of.” - R. A. Fisher