A contour plot is a graphical technique for representing a
3-dimensional z = f(x,y) surface by plotting constant-z "slices"
(contours) on a 2-dimensional format.
The dex contour plot is a specialized contour plot used in the
design of experiments.. It is used in the case where you have
two independent factors, each with two levels. The
low level is coded as "-1" and the high level is coded as
"+1". In addition, you can optionally have center points
(center points are coded as "0" and represent the value
of the independent variable halfway between the low level and
high level of that variable). These types of designs are
common for full and fractional factorial designs.
The dex contour plot is typically generated for the two
most important factors in the full or fractional factorial
design. The determination of exactly which are the two
most important factors is determined prior to generating
the dex contour plot (e.g., through the use of dex mean
plots).
The typical application of the dex contour plot is in
determining settings that will maximize (or minimize) the
response variable. It can also be helpful in determining
settings that result in the response variable hitting a
pre-determined target value.
The following are the primary steps in the construction
of the dex contour plot.
The x and y axes of the plot represent the values
of the first and second factor (independent) variable.
The 4 vertex points are drawn. The vertex points are
(-1,-1), (-1,1), (1,1), (1,-1). At each vertex point,
the average of all the response values at that vertex
point is printed.
Similarly, if there are center points, a point is drawn
at (0,0) and the average of the response values at the
center points is printed.
The linear dex contour plot assumes the model:
Y = MU + 0.5*(B1*U1 + B2*U2 + B12*U1*U2)
where MU is the overall mean of the response variables.
The values of B0, B1, B12, and MU are estimated from
the vertex points using a Yates analysis (the Yates
analysis utilizes the special structure of the
2-level full and fractional factorial designs to
simplify the computation of these parameters). Note
that Dataplot does not in fact generate a full Yates
analysis at this point, it simply utilizes the Yates
algorithm for determing the estimates for these
specific parameters.
In order to generate a single contour line, we need a
value for Y, say Y0. Next, we solve for U2 in terms
of U1 and, after doing the algebra, we have the
equation:
U2 = (2*(Y0 - MU) - B1*U1)/(B2 + B12*U1)
We generate a sequence of points for U1 in the range
-2 to 2 and compute the corresponding values of U2.
These points constitute a single contour line
corresponding to Y = Y0.
The user specifies the target values for which contour
lines will be generated.
Dataplot generates a curvature test. This is printed
as part of the alpanumeric output, not on the graph
itself.
The curvature test is a t-test based on the response
values at the vertex points and the center points.
Note that this test is only applied if center points
are in fact present. Also, the center points are
NOT utilized in the estimation of B1, B2, and B12.
They are only used as part of the curvature test.
The curvature test is used in determining if the linear
model is an fact an adequate model for the data. If
the null hypothese is rejected, the linear model is
not adequate. In that case, we would probably consider
the use of a quadratic, as oppossed to a linear, model.
Dataplot does not generate a dex contour plot for the
quadratic case directly. However, the built-in macro,
DEXCONTQ.DP, can be used. Enter LIST DEXCONTQ.DP for
details on how to run this macro. This macro uses the
Dataplot CONTOUR PLOT and FIT commands to generate
the quadratic dex contour plot.
Syntax:
DEX CONTOUR PLOT <y> <x1> <x2> <ycont>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response (= dependent) variable;
<x1> is the first factor (= independent)
variable;
<x2> is the second factor (= independent)
variable;
<ycont> is the variable containing the desired
contour levels;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional.
Examples:
LET YCONT = SEQUENCE 30 5 90
DEX CONTOUR PLOT Y X1 X2 YCONT
Note:
The appearance of the plot is controlled by the settings
of the LINE and CHARACTER command. In addition, you can
use the attribute settings for LINE and CHARACTER (e.g.,
color, thickness) to further control the appearance.
Specifically, if the design has center points, then
the line and character settings are controlled by:
trace 1
labels for the points at (-1,-1) and (-1,1). The character
setting is automatically set to a special type called ZVAL
and line is set to blank. The character justification is
automatically set to RIGHT. Although the character type and
justification are fixed, you can still set the other
CHARACTER attributes. For example, you can use
CHARACTER OFFSET to position the text.
trace 2
labels for the points at (+1,-1), (-1,1) and (0,0). The
character setting is automatically set to a special type
called ZVAL and line is set to blank. The character
justification is automatically set to LEFT. Although the
character type and justification are fixed, you can still
set the other CHARACTER attributes. For example, you can
use CHARACTER OFFSET to position the text.
trace 3
the center point. The line setting is typically
blank and the character type is commonly set to
CIRCLE.
trace 4
line connecting (-1,-1), (1,-1), (1,1), (-1,1).
The line type is typically set to SOLID and the
character type is typically set to CIRCLE.
trace 5+
the contour lines start with trace 5. There is
one trace for each value of YCONT. This allows
you to set the attributes for each contour line
individually. For example, you may want to
draw a thickened or colored line at the
maximum or minimum contour level. By default,
the contour levels are drawn from the maximum
to the minimum value.
If the design does not have center points, then
the line and character settings are controlled by:
trace 1
labels for the points at (-1,-1) and (-1,1). The character
setting is automatically set to a special type called ZVAL
and line is set to blank. The character justification is
automatically set to RIGHT. Although the character type and
justification are fixed, you can still set the other
CHARACTER attributes. For example, you can use
CHARACTER OFFSET to position the text.
trace 2
labels for the points at (+1,-1) and (-1,1). The
character setting is automatically set to a special type
called ZVAL and line is set to blank. The character
justification is automatically set to LEFT. Although the
character type and justification are fixed, you can still
set the other CHARACTER attributes. For example, you can
use CHARACTER OFFSET to position the text.
trace 3
line connecting (-1,-1), (1,-1), (1,1), (-1,1).
The line type is typically set to SOLID and the
character type is typically set to CIRCLE.
trace 4+
the contour lines start with trace 4. There is
one trace for each value of YCONT. This allows
you to set the attributes for each contour line
individually. For example, you may want to
draw a thickened or colored line at the
maximum or minimum contour level. By default,
the contour levels are drawn from the maximum
to the minimum value.
Note:
By default, the contour levels are drawn from the maximum
value to the minimum value.
If you want to draw the contour levels from the minimum to
the maximum, then enter the command:
SET DEX CONTOUR PLOT MINIMUM
To reset the default, enter
SET DEX CONTOUR PLOT MAXIMUM
Typically, it is common to highlight the maximum contour
line when you are trying to maximize the response and to
highlight the minimum contour line when you are trying to
minimize the response. The SET DEX CONTOUR PLOT command
can help simplify this by ensuring that the first
contour line drawn is the one you highlight.
Note:
In cases where there are more than two important factors,
you may want to generate the dex contour plot for several
different pairs. All the pairwise combinations for 3 or
more factors can be generated via a matrix plot. Enter
HELP SCATTER PLOT MATRIX for details. The Program 2 example
below gives an example of this.
Note:
The DEX CONTOUR PLOT command assumes a linear model for
the fit. You can use the macro DEXCONTQ.DP to generate
a dex contour plot assuming a quadratic model. Enter
LIST DEXCONTQ.DP for details.
Box, Hunter, and Hunter (1978), "Statistics for Experimenters,"
John Wiley, pp. 296-300.
Applications:
Design of Experiments
Implementation Date:
2000/07
Program 1:
SKIP 25
READ BOXYIELD.DAT Y X1 X2
LET YCONT = SEQUENCE 50 2 70
CHARACTER ZVAL ZVAL CIRCLE CIRCLE
CHARACTER FILL OFF OFF ON ON
CHARACTR HW 2 1.5 2 1.5
CHARACTER OFFSET -2 0 1 0
LINE SOLID ON ALL
LINE BLANK BLANK BLANK
LINE THICKNESS 0.1 0.1 0.1 0.1 0.3
Y1LABEL X1
X1LABEL X2
TITLE CASE ASIS
TITLE DEX Contour Plot: BOXYIELD.DAT
LIMITS -2 2
TIC MARK OFFSET UNITS SCREEN
TIC MARK OFFSET 5 5
DEX CONTOUR PLOT Y X1 X2 YCONT
Program 2:
skip 25
read boxclean.dat y x1 x2 x3 x4
let ycont = sequence 10 1 20
.
multiplot corner coordinates 10 10 90 90
multiplot scale factor 4
limits -2 2
tic mark offset 5 5
tic mark offset units screen
x1label displacement 4
.
character zval zval circle
character fill off off on
character hw 2 1.5 all
character offset -2 0 1 0
line solid all
line blank blank
line thickness 0.1 0.1 0.1 0.3
set matrix plot type dex contour plot
set matrix plot diagonal blank
matrix plot y x1 x2 x3 x4 ycont
.
move 50 97
justification center
text dex contour plot matrix for boxclean.dat