Skip to content

Home / Shared Math Details / DOE / Design Coding

Design Coding

Before a regression runs, Quantum XL puts each quantitative factor on a common scale. This page defines the three coding settings, the single expression they all feed, and the two rules that decide which data the scale is built from.

Coding does not change which model is fitted. It changes the units the coefficients come out in, and therefore how two coefficients compare to each other.

Notation

Term Description
\(x\) a factor value as entered on the design sheet
\(x_{\text{coded}}\) the same value after coding
\(m_c\) the centre the coding subtracts
\(s_c\) the scale the coding divides by
\(x_{\min}\), \(x_{\max}\) the lowest and highest value of that factor in the factorial portion
\(\bar{x}\), \(s\) the mean and sample standard deviation of that factor in the factorial portion
\(\alpha_{\text{axial}}\) the axial distance of a central composite design, in coded units. The dialog groups the setting under Alpha value and the design sheet writes Alpha = value; it is subscripted here because \(\alpha\) is the type I error rate

The coded value

Every quantitative factor is put on a common scale before the regression runs. One expression does it, whichever coding is in force, using a centre \(m_c\) and a scale \(s_c\) that the coding chooses:

\[ x_{\text{coded}} = \frac{x - m_c}{s_c} \]

A categorical factor is never coded this way. Its coded value is \(1\), and the level it sits at selects which coefficient is used instead.

An interaction's coded value is the product of the coded values of the factors in it.

Autocode

Autocoding takes the centre and the half-range of the factor's own data:

\[ m_c = \frac{x_{\max} + x_{\min}}{2} \qquad s_c = \frac{x_{\max} - x_{\min}}{2} \]

So the lowest setting codes to \(-1\), the highest to \(+1\), and the centre to \(0\). A factor with only one distinct value has a half-range of zero, so it cannot be autocoded either, and the coding stops.

Autocoding is what makes the coefficients of different factors comparable: every factor spans the same \(-1\) to \(+1\), so a larger coefficient means a larger effect over the range that factor was actually varied. This is the coding a Pareto of coefficients assumes.

Standardize

Standardizing takes the mean and the sample standard deviation of the factor's own data:

\[ m_c = \bar{x} \qquad s_c = s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1}} \]

A factor whose standard deviation is zero or cannot be computed cannot be standardized, and the software refuses rather than dividing by it.

Standardizing spans the data rather than the endpoints, so it is unaffected by where the extreme settings happen to fall. Where a design is balanced with equal numbers at the low and high settings the two codings give the same picture; where it is not, they differ.

Uncoded

Uncoded leaves the factor values exactly as entered, so the coefficients come out in the factor's own units.

Uncoded coefficients answer a different question: how much the response moves per unit of the factor, in the factor's own units. They are not comparable between factors measured on different scales.

Which rows set the scale

Only rows whose point type is factorial or edge centroid set the scale. Centre points, both kinds of axial point, and any extra runs added with Add/Remove Runs are all excluded. That applies to the minimum and maximum behind Autocode and equally to the mean and sample standard deviation behind Standardize.

Two consequences are worth knowing. Centre points and replicated centre runs do not move the centre or the scale. And an extra run entered outside the factorial range does not widen the minimum or the maximum, so it codes outside the usual range with nothing on the sheet to explain why.

A factor needs at least two distinct values among those rows. With only one the scale would be zero, and the coding stops instead, for Autocode as well as for Standardize.

For a central composite design under Autocode this has a visible consequence: the corners code to \(\pm 1\) as usual, and axial points beyond the corners code to values outside \(\pm 1\), at \(\pm \alpha_{\text{axial}}\). Under Standardize the same rows set a mean and a standard deviation instead, so neither the corners nor the axial points land on those values exactly.

The standard deviation model

The standard deviation model reuses the coding of the response model. It does not recompute a centre and scale from its own subset of rows, so the two models are on the same coded scale and their coefficients are comparable.

When coding stops

Coding runs when a model is loaded or a regression is started, not while you fill in the factor page, so these messages arrive later than the ones the builder raises. They identify the factor by its position in the design, counting from 1, not by the name you gave it, and they print it after a hash.

Message What caused it
There is no valid data provided for the Factor #n. the factor's column holds no usable value at all
Empty values are not allowed for factor #n. the column has at least one empty cell
Standardized coding cannot be used for factor #n. Please change the coding. Standardize is selected and that factor's standard deviation is not a valid positive number

A fourth case, a factor whose values are all identical, also stops the coding. The message intended for it does not appear: the call that builds it passes no substitution for its #n placeholder, so the coding reports an internal formatting error instead of the sentence. The condition is real and the coding does stop; only the wording is wrong.

Compare the messages the factor page itself raises, which use the factor's name: Factor Names and Coding.

See Also

References

  1. Box, G. E. P., Hunter, J. S., and Hunter, W. G. (2005). Statistics for Experimenters: Design, Innovation, and Discovery, 2nd edition. Wiley.
  2. Montgomery, D. C. (2013). Design and Analysis of Experiments, 8th edition. Wiley.
  3. NIST/SEMATECH e-Handbook of Statistical Methods, section on process improvement and coded variables.