Home / DOE / Charts / Interaction Plots
Interaction Plots¶
An interaction plot puts one factor along the bottom and draws a separate line for each level of a second factor. If the lines are parallel the two factors act independently. If they are not, the effect of one depends on the level of the other, which is what an interaction means.
QXL DOE New > Charts > Analysis > Interaction Plots
Lines that cross show an interaction strong enough to reverse the direction of an effect: the better setting of one factor is different depending on the other.
When to use it¶
An interaction plot draws the response against one factor with a separate line for each level of a second, so non-parallel lines correspond to a non-zero interaction coefficient. The chart identifies no best combination and marks nothing: it plots predicted values. Optimize is the command that searches for settings.
Where the numbers come from¶
Some charts can be built from either kind of sheet, and the two answer different questions.
A regression sheet gives the fitted model's prediction: a smooth value at any combination of settings, including combinations no run used. A design sheet gives the raw data: the average of the responses actually measured at each setting, and where a setting has replicates, their standard deviation. The design sheet can only speak about settings that were run.
Where both are offered, the dialog lists every eligible worksheet in the workbook and you pick one.
A chart built from a regression sheet does not re-fit the model. It reads the coefficients already on that sheet and evaluates the prediction equation with them.
Two things follow. The chart always agrees with the sheet it came from, so if you edit a coefficient the next chart changes with it. And a chart is only as current as its regression sheet: change the design and the old charts do not update, because nothing re-runs the regression for them.
A term that is not in the regression table, or that is switched off for the output level being charted, contributes exactly zero to the prediction. It is not an error and there is no warning: the chart is simply drawn from the reduced model. So a chart reflects which terms are active at the moment it is created, and two charts of the same output can differ because the active terms changed between them.
Design sheets are offered for quantitative outputs. For a binary or nominal output the plot needs a fitted probability, so only a regression sheet will do.
The dialog¶
This dialog is shared with Main Effects Plots and the Thumbnail Plot, so the options below mean the same thing on all three.
The left side of the dialog is a box headed Outputs holding a tree with three levels: the worksheet, then each output on it, then each level of that output. Tick the levels you want a chart for. The dialog opens with every level on the active sheet already ticked.
The two upper levels are three-state. Ticking a worksheet or an output ticks everything under it, and clearing it clears everything under it. When only some of the children are ticked, the parent shows a partial state rather than a tick, so the tree tells you at a glance whether a selection is complete.
One worksheet at a time. Ticking anything on a second worksheet silently clears every tick on the one you had selected, and the options on the right rebuild for the new sheet. There is no warning and no way to draw charts from two source sheets in one Create.
If you press Create with nothing ticked, the dialog tells you At least one chart must be selected. and stays open.
Chart layout¶
The box headed Chart layout decides how many charts one Create produces.
All factor pairs (grid) lays the ticked factors out as a square grid on one worksheet, with the factor names down the diagonal. Every pair appears twice, once with each factor on the horizontal axis, because the two orders are different charts. So four ticked factors give twelve charts on one sheet, not six. Use it to scan a model.
One specific pair draws a single chart from the two factors you name below, and gives it the whole sheet. Use it once you know which pair you care about.
The box headed Factors to plot carries a checkbox per factor and feeds the grid: the pairs are made from the factors ticked here. It has no effect when you have chosen one specific pair, because the pair is then taken from the two axis pickers instead.
The two factors of a single plot¶
With One specific pair chosen, two lists appear:
- Horizontal axis: the factor along the bottom.
- Separate lines for: the factor that gets one line per level.
Swapping the two shows the same interaction from the other side, and both views are drawn from the same model.
Set points¶
A chart can only vary the factors on its axes. Every other factor in the model has to be held at some value while the chart is drawn, and the box headed Set points (factors held constant) is where you choose those values.
The box is not always on screen. It belongs to a prediction, so:
- With a design sheet as the source it disappears entirely. A design-source chart averages the runs at each setting instead of predicting, so nothing is held constant, and the extrapolation prompt cannot appear either.
- On the Surface, Contour, Trellis and Cube dialogs it also disappears when no factor is being held, which happens when every factor in the model is on an axis.
Which factors get a row differs by dialog. On Surface, Contour, Trellis and Cube a factor's row is hidden while that factor is on an axis, except in grid mode, where every factor keeps a row because each one is held constant in the cells where it is not an axis. On the Interaction, Main Effects and Thumbnail dialog every factor keeps a row, and the rows for the plotted factors have no effect.
The set points are part of the prediction, not decoration. Changing one moves the whole surface, because the fitted model includes that factor and any interactions it appears in. Two charts of the same pair of factors at different set points are two different slices of the same model, and they can look nothing alike when the held factor interacts with an axis factor.
For a quantitative factor the set point is a value. For a categorical factor it is one of its levels.
A set point outside the range the factor took in the data makes the chart an extrapolation, and the software asks before drawing it. Keeping set points inside the observed range keeps the chart inside the region the experiment actually covered.
Before it draws¶
If anything you typed reaches outside the range the factor actually took in the data, the software asks before drawing. A set point is one source of that. On the dialogs that carry axis range boxes, which are Surface Plot, Contour Plot and Trellis, a From or to value counts too, as does a trellis slice range, so widening an axis past the experimental range raises the prompt on its own with every set point left alone. The prompt lists each offending entry with the factor's experimental range beside it, warns that the chart will extrapolate beyond the data, and asks whether to create it anyway. Answering no returns you to the dialog with your options intact.
This is a warning, not a refusal. A prediction outside the range of the data is an extrapolation of the fitted model, and the model was never tested there.
While charts are being written, a status line reports what is happening and a progress bar appears only when more than one chart is being drawn, since a bar for a single chart would sit at 100 percent from the moment it appeared.
Cancel stops the run cleanly between charts, not part way through one. A chart that has already been written stays; the sheet that was mid-write is deleted rather than left half finished. So cancelling never leaves a partial chart behind, but it can leave fewer sheets than you asked for.
What you get¶
A worksheet named Interactions Plot - output level name, placed immediately to the right of the sheet it came from.
The line style follows the horizontal axis factor, not the factor a line belongs to. When the factor on the horizontal axis is categorical, every line in that chart is dotted. When it is quantitative, the lines are solid. So a categorical Separate lines for: factor over a quantitative horizontal axis still gives solid lines.
The dotted line is a deliberate signal that the space between two levels does not exist: there is no setting between two vendors, so the line between their points is a guide for the eye rather than a set of predictions you could achieve. This is fixed and there is no setting that changes it.
Note that the Line type between two points of categorical factor setting on the Charts page of DOE Options has no effect here. It is left over from an earlier version and the chart ignores it.
How it is calculated¶
From a regression sheet, each point is a prediction with the two plotted factors at that point's settings and every other factor at its set point:
A prediction is the sum, over every term in the model, of that term's coded value times its coefficient:
where \(c_j\) is the coded value of term \(j\) at the settings you asked about and \(b_j\) is its coefficient from the regression table. The constant term has \(c_j = 1\), so its coefficient enters as itself.
A term that is absent from the regression table, or switched off for the level being predicted, contributes \(b_j = 0\).
Whenever the source is a regression sheet and the factor on the horizontal axis is quantitative, each line also carries a curve of 100 predictions spread across that line's range, whatever the output type. It is what lets curvature of any kind show, where straight segments drawn between the settings that were run would hide it. A categorical horizontal axis gets no curve. Full details: Prediction Equation.
From a design sheet the two plotted values come straight from the run data. The response value is the average of the responses at each distinct setting of the charted factors. The variation value is the average, over that same setting, of the standard deviations within each replicate group, using the sample standard deviation.
A setting with no replicate group of two or more runs has no variation to report and is left blank rather than shown as zero.
See Also¶
- Options, every control of the dialog
- Math Details, how each plotted value is formed
- Main Effects Plots, one factor at a time
- Thumbnail Plot, main effects and all interactions on one sheet
- Trellis, an interaction plot repeated across slices of a third factor
- Chart Source