Skip to content

Home / DOE / Charts / Residual Plots / Residual Plots How-To

Residual Plots How-To

This walkthrough plots four diagnostics against the fitted value, and uses one run to show why the four disagree about how unusual it is.

Every chart in this family is drawn from a fitted model, so the walkthrough starts by building one. The same experiment is used on all ten chart walkthroughs, so once you have the regression sheet you can work through any of the others without setting the data up again.

The data is on this page rather than in a file to download. Press Copy for Excel, then paste it into a blank worksheet.

The data

A three factor experiment on a bonding process, run twice through. Temp is in degrees C, Press in psi and Time in seconds, and the response Strength is the peel strength of the finished bond. Each of the eight factor combinations was run twice, giving 16 runs.

Temp Press Time Strength
180 40 10 49.5
220 40 10 65.4
180 60 10 61.8
220 60 10 66.8
180 40 20 52.3
220 40 20 70.7
180 60 20 60.7
220 60 20 70.0
180 40 10 50.6
220 40 10 66.4
180 60 10 61.2
220 60 10 67.2
180 40 20 51.4
220 40 20 67.1
180 60 20 61.9
220 60 20 71.6

Each factor takes exactly two values, so this is a full factorial of the three at two levels each, replicated once. That matters for more than one chart: a factor with exactly two observed values is the only kind that can carry a Cube Plot axis, and a design with centre points would have failed that test.

Steps

  1. Put the data in Excel

    Press Copy for Excel above the table. In Excel, open a blank worksheet, click cell A1, and press Ctrl+V. You should have headers in row 1 and the 16 runs in rows 2 through 17.

  2. Make a design sheet to hold it

    From the Excel ribbon: QXL DOE New > Create Design > Special > Create Custom Design.

    On the first page set the number of factors to 3 and the number of runs to 16. On the second page set the number of outputs to 1. That gives you an empty design sheet of the right shape, which is how data collected outside Quantum XL gets analysed.

  3. Fill in the design sheet

    Copy the four columns of data into the three factor columns and the one output column. Name the factors Temp, Press and Time, and the output Strength, so the names on your charts match the ones quoted below.

  4. Check the model holds the three two-factor interactions

    The charts below assume a model of the three main effects plus AB, AC and BC. Add any that are missing with QXL DOE New > Modify Design > Inputs > Add/Remove Interactions.

  5. Run the regression

    QXL DOE New > Analyze Design > Run Regression. A worksheet called Regression is added after the design sheet. Every chart in this family reads that sheet.

  6. Open the residual plots dialog

    QXL DOE New > Charts > Regression > Residual Plots.

    This dialog is not one of the new chart dialogs. It is the older one, with a Source for the plots: dropdown instead of an Outputs tree and four buttons along the bottom instead of one Create button. Nothing is missing; it is the one chart command that was not moved.

  7. Choose what to plot

    In Source for the plots: tick Strength Y-Hat on the Regression sheet.

    In the Plot on X-Axis list tick Predicted Y. In the Plot on Y-Axis list tick Residual, Studentized Residual, R-Studentized Residual and Cook's D.

    Also tick Create textual report, so you get the numbers as well as the pictures.

  8. Create

    Press Create and Exit.

Check the fit first

Before drawing anything, check the coefficient table on the Regression sheet against this. If these numbers match, every chart number quoted further down will match too; if they do not, the design was not entered the way this walkthrough assumes and nothing below will line up.

Term Coefficient Standard error t p
Constant 62.1625 0.2912 213.477 0.000000
Temp (A) 5.9875 0.2912 20.562 0.000000
Press (B) 2.9875 0.2912 10.260 0.000003
Time (C) 1.0500 0.2912 3.606 0.005696
AB -2.2375 0.2912 -7.684 0.000030
AC 0.6500 0.2912 2.232 0.052506
BC -0.1500 0.2912 -0.515 0.618877

The fitted equation is

Strength = 62.1625 + 5.9875 A + 2.9875 B + 1.0500 C - 2.2375 AB + 0.6500 AC - 0.1500 BC

in coded units, where each factor runs from -1 at its low value to +1 at its high value.

Every standard error is the same 0.2912. That is not a coincidence and it is a useful sign that the design was entered correctly: on a balanced full factorial every coded column is orthogonal to every other and carries the same amount of information, so every coefficient is estimated equally precisely.

What you should see

Four charts, one per ticked Y item, each against Predicted Y, plus a textual report holding the numbers behind them. Sixteen points on every chart, one per run.

Start with the leverage column of the report, because it is the same number sixteen times.

Value
Leverage, every run 0.4375
Model terms, the constant included 7
Runs 16

7 divided by 16 is 0.4375 exactly. On a balanced full factorial every run carries identical leverage, because every run sits at the same distance from the centre of the design in coded space. That makes this design a good one to learn the other three diagnostics on: leverage is held constant, so any difference between runs comes from how well each was fitted and from nothing else.

It also means the leverage chart is a flat line, which is the correct answer and not a fault.

The four diagnostics on the run that stands out

Run 14 is the run to find. Here is what each of the four says about it, against the largest value anywhere else on the chart:

Diagnostic Run 14 Largest of the other fifteen
Residual -2.1500 1.4500 (run 6)
Studentized Residual -2.4612 1.6599 (run 6)
R-Studentized Residual -4.0580 1.8787 (run 6)
Cook's D 0.6730 0.3061 (run 6)

The four do not agree about how unusual run 14 is, and the disagreement is the useful part.

Its plain residual of -2.1500 is about one and a half times the next largest. Its studentized residual, -2.4612, is the same thing scaled and still about one and a half times. But its R-Studentized residual of -4.0580 is more than twice the next largest, and its Cook's D of 0.6730 is more than double as well.

R-Studentized is the one that jumps, and that is what it is for. It is computed with run 14 left out of the estimate of the error, so the run cannot inflate the yardstick it is being measured against. Run 14 is pulling the fit towards itself and enlarging the residual standard error; take it out of that estimate and its own residual looks far larger.

Cook's D says the same thing a different way: it measures how much the whole set of fitted values would move if run 14 were dropped.

Why run 14 is like that

Runs 6 and 14 are the same design point, 220 C, 40 psi, 20 seconds, measured twice, at 70.7 and 67.1. They disagree by 3.6. The model has one prediction for that combination, 69.25, so it sits between the two and both runs get a large residual of opposite sign.

So the chart is reporting the repeatability of the experiment, not a mistake in the model. No fitted surface can pass through two different responses at identical settings.

Where these numbers come from

Four of the values on this dialog are not computed by Quantum XL. Leverage, Residual, Studentized Residual, R-Studentized Residual, Cook's D and the fitted values all come from the regression library Quantum XL uses. It chooses the model, hands over the design matrix and the response, and reads these vectors back. See Math Details.

Things to try next

  • Plot against a factor instead. Untick Predicted Y on the X axis and tick Temp. The same sixteen residuals are drawn against the setting each run used, which is where a pattern in one factor would show.
  • Tick the same item on both axes. Tick Predicted Y on both lists. You lose one chart rather than getting an error: the combination where both axes carry the same quantity is skipped.
  • Report only. Untick every chart item and leave Create textual report ticked. Create still runs and writes the numbers with no charts at all.

See Also