VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | Component-Plus-Residual Plots: Fitted Components and Shape

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
  1. The two-layer diagnostic question
  2. The NIST definition
  3. The two coordinates
  4. A worked example
Chapters 5–9 · Reproduce the example
  1. Why the component is a line
  2. What departure means
  3. CCPR versus partial residual plot
  4. CCPR versus added-variable plot
  5. Collinearity limitation
Chapters 10–15 · Check assumptions
  1. Sparse ranges and extrapolation
  2. Interactions and nonlinear terms
  3. Checking one residual
  4. A spreadsheet workflow
  5. A coding workflow
  6. Applications and careers
Chapters 16–20 · Explore applications
  1. A design example
  2. Limits and responsible interpretation
  3. Common misconceptions
  4. Connection to recent mathematics articles
  5. Guidance for students and parents
Chapters 21–23 · Study and verify
  1. Practice questions
  2. Frequently asked questions
  3. Useful next reading

CHAPTER 1 OF 23 · Understand the question

1. The two-layer diagnostic question

Back to contents

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.

Contents · Next chapter

CHAPTER 2 OF 23 · Understand the question

2. The NIST definition

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 3 OF 23 · Understand the question

3. The two coordinates

Back to contents

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.

CoefficientPredictorResidual
1.53-0.7
CCPR inputs.

Contents · Previous chapter · Next chapter

CHAPTER 4 OF 23 · Understand the question

4. A worked example

Back to contents

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.

ComponentComponent plus residualVertical gap
4.53.8-0.7
CCPR layers.

Contents · Previous chapter · Next chapter

CHAPTER 5 OF 23 · Reproduce the example

5. Why the component is a line

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 6 OF 23 · Reproduce the example

6. What departure means

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 7 OF 23 · Reproduce the example

7. CCPR versus partial residual plot

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 8 OF 23 · Reproduce the example

8. CCPR versus added-variable plot

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 9 OF 23 · Reproduce the example

9. Collinearity limitation

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 10 OF 23 · Check assumptions

10. Sparse ranges and extrapolation

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 11 OF 23 · Check assumptions

11. Interactions and nonlinear terms

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 12 OF 23 · Check assumptions

12. Checking one residual

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 13 OF 23 · Check assumptions

13. A spreadsheet workflow

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 14 OF 23 · Check assumptions

14. A coding workflow

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 15 OF 23 · Check assumptions

15. Applications and careers

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 16 OF 23 · Explore applications

16. A design example

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 17 OF 23 · Explore applications

17. Limits and responsible interpretation

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 18 OF 23 · Explore applications

18. Common misconceptions

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 19 OF 23 · Explore applications

19. Connection to recent mathematics articles

Back to contents

Read the partial regression plots guide for coefficient-focused residual axes and the VIF guide for the overlap warning.

Contents · Previous chapter · Next chapter

CHAPTER 20 OF 23 · Explore applications

20. Guidance for students and parents

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 21 OF 23 · Study and verify

21. Practice questions

Back to contents

  • 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.

Contents · Previous chapter · Next chapter

CHAPTER 22 OF 23 · Study and verify

22. Frequently asked questions

Back to contents

### 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.

Contents · Previous chapter · Next chapter

CHAPTER 23 OF 23 · Study and verify

23. Useful next reading

Back to contents

Continue through the Mathematics Learning Hub. Recreate a CCPR plot from saved model columns and compare it with the raw response scatter.

Contents · Previous chapter · Mathematics Learning Hub

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.