Home / DOE / Analyze / Uncoded Coefficients / Uncoded Coefficients How-To
Uncoded Coefficients How-To¶
This walkthrough fits the same sixteen runs twice, coded and uncoded, and checks one coefficient column against the other. That comparison is the clearest way to see what coding does and what it does not.
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¶
-
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.
-
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.
-
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.
-
Answer the two questions a custom design asks
A custom design does not record how it was built, so the first time you run a regression, run Optimize, or open Modify Design on it, Quantum XL asks for what the sheet cannot say, and stores your answers so it never asks again.
On the first page leave Type: at Quantitative for all three factors. On the second, the interaction editor, move AB, AC and BC from Interactions available into Interactions in model: three main effects plus those three interactions is the model every walkthrough below assumes. The remaining degrees of freedom fall as you add each one, because the sixteen runs are fixed and every term spends one.
Afterwards the same editor is reachable at any time from QXL DOE New > Modify Design > Inputs > Add/Remove Interactions.
-
Run the regression
QXL DOE New > Analyze Design > Run Regression. A worksheet called Regression is added after the design sheet, and it is the sheet the walkthroughs below read.
-
Run the uncoded regression
QXL DOE New > Analyze Design > Uncoded Coefficients, with the design sheet active.
No dialog. It fits the same model as Run Regression with the sheet's coding instructions ignored, and writes a second regression sheet.
Check the coded fit first¶
Check the coefficient table on the Regression sheet against this first. If these numbers match, every 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 the uncoded sheet reports¶
| Term | Uncoded coefficient |
|---|---|
| Constant | -110.425 |
| Temp | 0.76125 |
| Press | 2.58125 |
| Time | -0.94 |
| Temp*Press | -0.0111875 |
| Temp*Time | 0.0065 |
| Press*Time | -0.003 |
so the uncoded equation is
Strength = -110.425 + 0.76125 Temp + 2.58125 Press - 0.94 Time - 0.0111875 Temp*Press + 0.0065 Temp*Time - 0.003 Press*Time
with Temp in degrees C, Press in psi and Time in seconds.
What is different, and what is not¶
The fit is the same fit. R-squared is 0.9854 on both sheets, the residual sum of squares is 12.21 on both, and every predicted value is identical run for run. Predict at Temp 220, Press 60, Time 20 from either equation and both give 70.45. Only the coefficients change, because they are expressed against a different X matrix.
Check that yourself at the centre of the design. Temp 200, Press 50, Time 15 is coded 0, 0, 0, so the coded equation returns its constant, 62.1625. Put the same three settings into the uncoded equation and it returns 62.1625 as well, out of seven terms that look nothing alike.
The arithmetic that connects the two columns¶
Every interaction coefficient is the coded one divided by the product of the half-ranges of the factors in it. The half-ranges here are Temp 20, Press 10 and Time 5, half the distance between each factor's two settings:
| Term | Coded | Divided by | Uncoded |
|---|---|---|---|
| Temp*Press | -2.2375 | 20 x 10 = 200 | -0.0111875 |
| Temp*Time | 0.6500 | 20 x 5 = 100 | 0.0065 |
| Press*Time | -0.1500 | 10 x 5 = 50 | -0.003 |
It does not work for the main effects, and that is the thing worth understanding. Temp's coded coefficient over its half-range is 5.9875 / 20 = 0.299375, and the uncoded Temp coefficient is 0.76125, which is nothing like it. Time's coded coefficient is positive and its uncoded one is negative.
The reason is the interactions. In coded units the model is centred, so a main effect is the average slope over the design. In real units the same surface has to be described from an origin at Temp 0, Press 0, Time 0, which is far outside the experiment, and the interaction terms carry part of the slope there. The divide-by-half-range rule holds exactly for a term no other term multiplies, which here is only the three interactions, and it would hold for the main effects too in a model that had no interactions in it.
Which p values agree, and which do not¶
Turn the p values on from the Regression page of QXL DOE New > Options: the setting is Show P-Value for the uncoded regression, and it is off by default, so the P column is blank and the sheet writes a notice saying so. A custom design is exempt and prints its p values whatever the setting says.
With them on, three of the seven match the coded sheet exactly and four do not:
| Term | Coded p | Uncoded p |
|---|---|---|
| Constant | 0.000000 | 0.000162 |
| Temp | 0.000000 | 0.000010 |
| Press | 0.000003 | 0.000014 |
| Time | 0.005696 | 0.184303 |
| Temp*Press | 0.000030 | 0.000030 |
| Temp*Time | 0.052506 | 0.052506 |
| Press*Time | 0.618877 | 0.618877 |
The three interactions test identically because they are the highest-order terms in the model. Rescaling and shifting the factors multiplies such a coefficient and its standard error by the same constant, so the ratio of the two, which is the whole test, does not move.
Time goes from p = 0.0057 to p = 0.1843 on the same fit. Nothing about the model changed. The two sheets are asking different questions: the coded sheet asks whether Time matters averaged over the design, and the uncoded sheet asks whether the Time coefficient at an origin of Temp 0 and Press 0 differs from zero. That is why the coded fit is the one to read effects off.
Uncoded coefficients are not comparable across factors either. A coefficient per degree and a coefficient per psi have different units, so their sizes cannot be ranked against each other. Ranking is what the coded fit is for; predicting in real units is what this one is for.
Things to try next¶
- Divide each interaction coefficient by its product of half-ranges and check it against the table above. Three for three is a strong sign the design was entered correctly.
- Predict at a setting you did not run, say Temp 210, Press 45, Time 12, straight from the uncoded equation. That is the form to use when the arithmetic has to happen in real units.
- Remove the three interactions and run both again. With no interactions left, each main effect becomes exactly its coded coefficient over its half-range: Temp 5.9875 / 20 = 0.299375, Press 2.9875 / 10 = 0.29875, Time 1.05 / 5 = 0.21, and each keeps its coded p value to the last digit. The constant still differs, 62.1625 coded against -15.8 uncoded, because it is the fitted value at Temp 0, Press 0, Time 0 rather than at the centre of the design.