Choose your reading route
eduKateSG · Why Mathematics? · Component-Plus-Residual Plots: Fitted Components and Shape
Start with the question, audit the worked example, or jump to the assumptions and practice. Every chapter stays open for uninterrupted reading.
Understand the question
Define the quantity and follow the mechanism.Route 2 · Chapters 5–9
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 10–15
Check assumptions
See where design and calibration matter.Route 4 · Chapters 16–20
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 21–23
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important when a regression diagnostic should show both the fitted linear component and the departures around it? A component-plus-residual, or CCPR, plot places two related quantities against one predictor: the fitted component beta-hat_j x_j and the component plus the full-model residual.
The paired display gives a visible reference for the model's linear contribution while preserving residual departures that may reveal shape problems.
Did You Know? CCPR stands for component and component-plus-residual. The two layers differ by exactly the ordinary residual for each observation.
Full chapter index
Chapters 1–4 · Understand the question
Chapters 5–9 · Reproduce the example
Chapters 10–15 · Check assumptions
Chapters 16–20 · Explore applications
Chapters 21–23 · Study and verify
A partial residual plot shows adjusted departures but may leave the fitted reference implicit. A CCPR plot adds the component beta-hat_j x_j as a second layer, making it easier to compare the model's straight contribution with the observed component-plus-residual cloud.
NIST describes CCPR as a refinement of the partial residual plot: it plots residual + beta-hat_i X_i and also adds beta-hat_i X_i against X_i. The second layer indicates where the fitted component lies. Read the NIST CCPR reference.
For observation i, calculate the fitted component f_i = beta-hat_j x_ij. Calculate the component-plus-residual value c_i = f_i + e_i. Plot both f_i and c_i against x_ij. Their vertical difference is e_i.
| Coefficient | Predictor | Residual |
|---|---|---|
| 1.5 | 3 | -0.7 |
Let beta-hat_j=1.5, x=3 and residual e=-0.7. The fitted component is 1.5×3=4.5. The component-plus-residual value is 4.5-0.7=3.8. At x=3, the two plotted heights are 4.5 and 3.8.
| Component | Component plus residual | Vertical gap |
|---|---|---|
| 4.5 | 3.8 | -0.7 |
With a simple linear term, beta-hat_j x_j is a straight line through zero on the component scale. An intercept belongs to the full model but is not part of this individual predictor component unless a software display defines otherwise.
Vertical distance from the component line equals the ordinary residual. A systematic curved pattern in those departures suggests that the target predictor's linear term may not capture the fitted-sample relationship.
The component-plus-residual points are the same coordinates used in a partial residual plot. CCPR adds the fitted component line or component points explicitly. The extra layer is a reference, not a new estimator.
An added-variable plot residualises both response and target predictor and is useful for coefficient influence. CCPR keeps the original predictor on the horizontal axis and is usually more direct for examining functional form.
NIST repeats the partial-residual warning: if the target predictor is highly correlated with other predictors, the displayed variation can be misleading. The apparent line and scatter do not restore information that the design lacks.
A smoother near the edge may be supported by only a few cases. Mark the data density and do not extend the displayed component beyond the observed predictor range without a separate extrapolation argument.
When the model already includes x squared, splines or x-by-z interactions, there may be several columns associated with the conceptual predictor. State which component is plotted and consider term-level or conditional-effect displays.
Subtract the component height from the component-plus-residual height. The result should equal the saved full-model residual for the same row. This identity is a simple and powerful implementation check.
Store x, beta-hat_j, fitted component, residual and component-plus-residual in separate labelled columns. Plot both vertical series against the same x column and verify their difference for several rows.
Use a tested CCPR function or calculate both layers explicitly from the fitted model matrix. Confirm how categorical variables, centring and transformations are encoded before labelling the horizontal axis.
CCPR plots appear in engineering response models, economics, biomedical analysis, environmental forecasting and model audits. They teach a transferable habit: compare what the model contributes with what the observations leave unexplained.
Suppose building energy use is modelled from floor area, occupancy and outdoor temperature. A temperature CCPR plot can show whether one straight temperature component misses a bend associated with heating and cooling regimes.
The display does not select a model automatically, prove a threshold, establish causation or validate data quality. It must be combined with domain knowledge, uncertainty and predictive checking.
The component line is not the full fitted response. The component-plus-residual values are not raw outcomes. A smooth curve through the points does not erase uncertainty or justify unlimited complexity.
CHAPTER 19 OF 23 · Explore applications
19. Connection to recent mathematics articles
Read the partial regression plots guide for coefficient-focused residual axes and the VIF guide for the overlap warning.
Students should calculate both layers for one observation and show that their difference is the residual. Parents can ask whether the suggested curve is stable, scientifically sensible and useful on new data.
- Recalculate the worked example with residual 0.9.
- Explain why the vertical gap equals the residual.
- Describe one case where an interaction makes a single CCPR plot incomplete.
### Does CCPR produce a new coefficient? No. It visualises quantities from the fitted model.
### Is the component the full prediction? No. It is one predictor's fitted contribution.
### Can it diagnose causation? No.
Continue through the Mathematics Learning Hub. Recreate a CCPR plot from saved model columns and compare it with the raw response scatter.
Extended practice laboratory
Practice case 1: Calculate fitted component
Setup: Use the article’s CCPR worked example as the starting record for case 1. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 2: Calculate component plus residual
Setup: Use the article’s CCPR worked example as the starting record for case 2. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 3: Verify the vertical gap
Setup: Use the article’s CCPR worked example as the starting record for case 3. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 4: Change the residual
Setup: Use the article’s CCPR worked example as the starting record for case 4. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 5: Change the coefficient
Setup: Use the article’s CCPR worked example as the starting record for case 5. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 6: Reverse predictor sign
Setup: Use the article’s CCPR worked example as the starting record for case 6. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 7: Compare full prediction
Setup: Use the article’s CCPR worked example as the starting record for case 7. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 8: Compare partial residual
Setup: Use the article’s CCPR worked example as the starting record for case 8. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 9: Compare added-variable plot
Setup: Use the article’s CCPR worked example as the starting record for case 9. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 10: Add a smooth curve
Setup: Use the article’s CCPR worked example as the starting record for case 10. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 11: Inspect sparse edge
Setup: Use the article’s CCPR worked example as the starting record for case 11. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 12: Label an influential case
Setup: Use the article’s CCPR worked example as the starting record for case 12. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 13: Increase collinearity
Setup: Use the article’s CCPR worked example as the starting record for case 13. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 14: Centre x
Setup: Use the article’s CCPR worked example as the starting record for case 14. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 15: Use a log term
Setup: Use the article’s CCPR worked example as the starting record for case 15. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 16: Use a quadratic term
Setup: Use the article’s CCPR worked example as the starting record for case 16. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 17: Inspect an interaction
Setup: Use the article’s CCPR worked example as the starting record for case 17. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 18: Check dummy encoding
Setup: Use the article’s CCPR worked example as the starting record for case 18. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 19: Audit one row
Setup: Use the article’s CCPR worked example as the starting record for case 19. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 20: Preserve row IDs
Setup: Use the article’s CCPR worked example as the starting record for case 20. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 21: Compare two software outputs
Setup: Use the article’s CCPR worked example as the starting record for case 21. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 22: State axis units
Setup: Use the article’s CCPR worked example as the starting record for case 22. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 23: Reject causal language
Setup: Use the article’s CCPR worked example as the starting record for case 23. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 24: Reject automatic complexity
Setup: Use the article’s CCPR worked example as the starting record for case 24. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 25: Write a CCPR conclusion
Setup: Use the article’s CCPR worked example as the starting record for case 25. Task: Change the input named in this case, recalculate every dependent quantity and state the comparison in one precise sentence.
Check: Check the defining identity, preserve the declared model and explain what additional graph, diagnostic or validation evidence is needed. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.