Tutorials › ANOVA › Checking RCBD Model Assumptions With Residuals

Analyzing Randomized Complete Block Data · Tutorial 141 of 595

Checking RCBD Model Assumptions With Residuals

Use fitted values and residuals to assess whether an additive RCBD analysis is credible, and recognize when a pattern calls for closer investigation.

Intermediate 12 min read

What You'll Learn

  • State the error assumptions behind the additive randomized complete block model.
  • Calculate fitted values and residuals from treatment and block means.
  • Read residual-versus-fitted plots for changing spread and remaining patterns.
  • Use a normal probability plot to assess departures from approximate normality.
  • Inspect residuals by block while recognizing that plots cannot prove independence.
  • Distinguish a large residual from an influential observation and calculate a diagnostic measure.

Why Check Residuals?

An ANOVA table summarizes variation, but it does not show whether the model gives a reasonable account of the observations. In a randomized complete block design (RCBD), the additive model represents each response as a grand mean, a treatment effect, a block effect, and random error. Residual plots help reveal whether the errors are plausibly centered around zero with similar spread, whether their distribution is reasonably compatible with normality, and whether any observations or patterns deserve investigation.

These plots are diagnostic tools, not pass-or-fail tests. A tidy-looking plot cannot establish that assumptions are true, and a pattern may have several explanations. The design and the way outcomes were collected remain important, especially when considering independence.

Model and assumptions: For \(t\) treatments and \(b\) blocks, write the additive RCBD model as \(Y_{ij}=\mu+\tau_i+\beta_j+\varepsilon_{ij}\), where \(Y_{ij}\) is the response for treatment \(i\) in block \(j\), \(\mu\) is the grand mean, and \(\tau_i\) and \(\beta_j\) are treatment and block effects. The errors are assumed to have mean zero, common variance \(\sigma^2\), and to be independent and approximately normally distributed. The model is additive: it represents each cell mean using a treatment effect plus a block effect, without an extra treatment-by-block term. In practice, error independence is supported chiefly by study design and conduct; a residual plot can raise concerns but cannot prove independence.

For a complete balanced RCBD, the fitted value is the additive estimate for the corresponding treatment-block cell:

$$ \hat{Y}_{ij}=\bar{Y}_{i\cdot}+\bar{Y}_{\cdot j}-\bar{Y}_{\cdot\cdot}, \qquad e_{ij}=Y_{ij}-\hat{Y}_{ij}. $$

Here \(\bar{Y}_{i\cdot}\) is the mean for treatment \(i\), \(\bar{Y}_{\cdot j}\) is the mean for block \(j\), and \(\bar{Y}_{\cdot\cdot}\) is the grand mean. A residual \(e_{ij}\) is the observed response minus the value fitted by the model. Positive residuals mean the observed response is above its fitted value; negative residuals mean it is below.

Worked Example: Calculate Fitted Values and Residuals

Worked Example: Calculate Fitted Values and Residuals

Suppose a hypothetical experiment compares three treatments in four blocks. The responses, in arbitrary measurement units, are:

TreatmentBlock 1Block 2Block 3Block 4
A881113
B9121215
C10131617

The treatment means are \(10\), \(12\), and \(14\); the block means are \(9\), \(11\), \(13\), and \(15\); and the grand mean is \(12\). For treatment A in block 1, the fitted value is \(10+9-12=7\), so its residual is \(8-7=1\). Applying the same calculation to each cell gives:

$$ \begin{array}{c|rrrr} & \text{Block 1} & \text{Block 2} & \text{Block 3} & \text{Block 4}\\ \hline \text{Fitted, A} & 7 & 9 & 11 & 13\\ \text{Fitted, B} & 9 & 11 & 13 & 15\\ \text{Fitted, C} & 11 & 13 & 15 & 17\\ \hline \text{Residual, A} & 1 & -1 & 0 & 0\\ \text{Residual, B} & 0 & 1 & -1 & 0\\ \text{Residual, C} & -1 & 0 & 1 & 0 \end{array} $$

The residual sum of squares is \(SSE=1^2+(-1)^2+1^2+(-1)^2+(-1)^2+1^2=6\). There are \(tb=12\) observations and \(t+b-1=6\) fitted model parameters, so the residual degrees of freedom are \(12-6=6\). Thus \(MSE=SSE/df=6/6=1\). This gives a numerical scale for interpreting the residuals and illustrates how their patterns can be inspected.

Residuals Versus Fitted Values

Plot each residual against its fitted value. If the constant-variance and mean-structure assumptions are reasonable, the points should generally form a horizontal cloud around zero, with roughly similar vertical spread across the range of fitted values. A curve or other systematic shape can signal that the model is leaving structure unexplained. A fan or funnel shape—spread that grows or shrinks as fitted values change—can indicate nonconstant variance.

In the example, fitted values range from 7 to 17, and the residuals are only \(-1\), \(0\), or \(1\). There is no increasing spread at the high fitted values: the largest absolute residual is 1 throughout. That is not evidence that the variance is constant in the population. There are only 12 observations, and the repeated values make this small example a poor basis for judging a distribution. The appropriate conclusion is modest: this particular plot does not display an obvious funnel.

Residuals are estimated errors, not the unobserved errors themselves. They also have built-in constraints because the model was fitted to the same responses. In a balanced RCBD with an intercept, their sum is zero within each treatment and within each block. These constraints create some dependence among residuals even when the model errors are independent. Do not treat a pattern among residuals as a formal test of error independence.

Normal Probability Plots and Standardized Residuals

A normal probability plot (also called a normal Q–Q plot) orders the residuals and compares them with the values expected from a normal distribution. If the error distribution is approximately normal, the plotted points should lie roughly along a straight line. Marked curvature, strong asymmetry, or isolated points far from the rest can be warning signs. With small samples, the plot is noisy; modest departures from a line are not decisive.

Residuals can be put on a common scale using the residual mean square. In a balanced RCBD, every cell has the same leverage, or diagonal entry of the projection matrix, \(h_{ij}=1/t+1/b-1/(tb)\). The internally standardized residual is:

$$ r_{ij}=\frac{e_{ij}}{\sqrt{MSE(1-h_{ij})}}. $$

The adjustment matters because a fitted residual typically has less variability than an error, and the amount depends on leverage. In the 3-treatment, 4-block example, \(h_{ij}=1/3+1/4-1/12=1/2\). Since \(MSE=1\), a residual of 1 standardizes to \(1/\sqrt{1(1-1/2)}=1.414\), a residual of \(-1\) to \(-1.414\), and a zero residual remains zero. The ordered standardized residuals are \(-1.414\) three times, \(0\) six times, and \(1.414\) three times. That stepped pattern is a consequence of the small, discrete set of residuals here; it is not enough to establish that the underlying errors are nonnormal.

Residuals by Block and Independence Concerns

A residual-by-block plot groups the residuals by block, usually with treatment-specific points shown within each block. It can reveal whether particular blocks contain unusually large residuals, whether the spread differs noticeably across blocks, or whether there is a pattern in the observations that merits investigation. In the example, the residuals in blocks 1 through 4 are respectively \((1,0,-1)\), \((-1,1,0)\), \((0,-1,1)\), and \((0,0,0)\). Their block averages are all zero, as expected from fitting block effects; that fact is a fitting constraint, not evidence that the blocks are interchangeable or that errors are independent.

Independence is primarily a question about how the experiment was conducted. Ask whether responses could be linked by time, location, shared materials, repeated measurement, or another feature not represented by the design. If observations were collected in a meaningful sequence, plot residuals in that order as well; runs of positive values followed by runs of negative values may suggest dependence or a missing pattern. A residual-by-block plot alone cannot rule out dependence within a block or across an unrecorded ordering.

Worked Example: Interpreting a Normal Probability Plot

Worked Example: Interpreting a Normal Probability Plot

For the hypothetical data above, the residual mean square is \(1\), and the balanced-design leverage is \(1/2\). The standardizing denominator is therefore \(\sqrt{1(1-1/2)}=\sqrt{0.5}=0.7071\). A residual of \(1\) becomes \(1/0.7071=1.414\); a residual of \(-1\) becomes \(-1.414\); and each zero remains zero. There are three positive residuals, three negative residuals, and six zeros, so the ordered standardized values are \(-1.414,-1.414,-1.414\), followed by six zeros, followed by \(1.414,1.414,1.414\).

On a normal probability plot these repeated values would form groups rather than a smooth line. The calculation and plot describe the observed residuals; they do not establish the shape of the error distribution. With just 12 responses, the right assessment is that normality is difficult to judge from this example, not that normality has been disproved. In a real analysis, investigate a substantial departure in context and consider whether a data issue or an unsuitable model could explain it.

Large Residuals and Influential Observations

A large standardized residual identifies an observation poorly fitted by the model, but it does not by itself show that the observation is influential. Influence concerns how much the fitted model or a conclusion changes when an observation is included rather than omitted. In a balanced RCBD, cell leverages are equal, but a sufficiently large residual can still have a substantial effect. A useful diagnostic is Cook’s distance, which summarizes the change in fitted values when an observation is removed. For a least-squares model with \(p\) fitted parameters, residual \(e_i\), leverage \(h_i\), and \(MSE\), it is:

$$ D_i=\frac{e_i^2}{p\,MSE}\frac{h_i}{(1-h_i)^2}. $$

Cook’s distance is a screening measure, not a decision rule. A large value calls for checking the observation and examining how conclusions change; it is not a license to discard data. The model here has \(p=t+b-1\) fitted parameters. In the balanced design, leverage is \(h=1/t+1/b-1/(tb)\), as above.

Worked Example: Investigating a Potentially Influential Response

Worked Example: Investigating a Potentially Influential Response

Suppose the response for treatment A in block 1 in the first example had been recorded as 12 instead of 8, with all other entries unchanged. The original residual for that cell was \(e_i=1\); the change to the response is \(\delta=4\), and its leverage is \(h_i=0.5\). Because the fitted model is a least-squares projection, the updated residual sum of squares is the original \(SSE\), plus \(2\delta e_i+\delta^2(1-h_i)\):

$$ SSE_{\mathrm{new}}=6+2(4)(1)+4^2(1-0.5)=6+8+8=22. $$

The residual degrees of freedom remain 6, so \(MSE_{\mathrm{new}}=22/6=3.667\). The selected cell’s residual increases by \(\delta(1-h_i)=4(0.5)=2\), from 1 to 3. Its internally standardized residual is \(3/\sqrt{(22/6)(1-0.5)}=3/\sqrt{11/6}\approx 2.216\). This is a reason to examine the observation, but it does not establish an error in the data.

For Cook’s distance, \(p=3+4-1=6\). Substituting the updated values gives \(D_i=[3^2/(6(3.667))][0.5/(0.5)^2]=0.8182\). This value suggests checking the response and assessing how sensitive the analysis is to it. First verify data entry and measurement records; then compare the analysis with and without the observation as a sensitivity check. Any exclusion needs a defensible reason independent of a desire for a particular result.

A Short Justification for the Standardization

The residual adjustment used above follows from least-squares projection. Let \(H\) be the projection matrix onto the fitted model space, so the vector of fitted values is \(HY\) and the residual vector is \(e=(I-H)Y\). Under the model, the response errors have variance \(\sigma^2 I\). Since \(H\) is symmetric and idempotent, \(I-H\) is also symmetric and idempotent. Therefore:

$$ \operatorname{Var}(e) =(I-H)(\sigma^2 I)(I-H) =\sigma^2(I-H). $$

The diagonal element for observation \(i\) is consequently \(\operatorname{Var}(e_i)=\sigma^2(1-h_i)\). Replacing the unknown \(\sigma^2\) with its estimate \(MSE\) gives the estimated residual standard deviation \(\sqrt{MSE(1-h_i)}\), which is the denominator in the internally standardized residual. Standardization puts residuals on a more comparable scale; it does not make them independent or turn a diagnostic into a formal proof of the assumptions.

Common Mistakes and a Practical Review

  • Treating a plot as proof. A roughly even cloud is compatible with constant variance, but it cannot prove constant variance or independence. Combine visual checks with knowledge of the design and data collection.
  • Reading normality from a few points. Small samples make normal probability plots imprecise. Look for pronounced departures, not minor deviations from a perfect line.
  • Calling every large residual influential. A residual describes mismatch for one observation; influence describes its impact on the fitted analysis. Check both residual size and sensitivity of the result.
  • Removing an inconvenient observation automatically. Verify it and document a defensible decision. Do not remove a valid response solely because it changes a test or estimate.
  • Interpreting residual constraints as evidence. Residuals sum to zero across fitted treatment and block margins in a complete balanced RCBD. This is a consequence of fitting the model, not independent confirmation of its assumptions.
Key takeaway: Use residual-versus-fitted plots to look for unequal spread or remaining structure, normal probability plots to assess approximate normality, and block or sequence plots to notice patterns that merit investigation. Check potential influence separately, and judge independence mainly from how the observations were generated.

Check Your Understanding

Try these questions using the model and diagnostics described above.

  1. In a residual-versus-fitted plot, what pattern would raise concern about nonconstant error variance?
  2. For a complete RCBD with 4 treatments and 5 blocks, calculate the common cell leverage \(h_{ij}=1/t+1/b-1/(tb)\).
  3. Why can residuals within a block show constraints even when the model errors are independent?
  4. What does a pronounced curve in a normal probability plot suggest, and why is a small sample a limitation?
  5. Explain why a large standardized residual does not automatically justify removing an observation.
Clinical Biostats