Vdgraph: A Package for Creating Variance Dispersion Graphs

This article introduces the package Vdgraph that is used for making variance dispersion graphs of response surface designs. The package includes functions that make the variance dispersion graph of one design or compare variance dispersion graphs of two designs, which are stored in data frames or matrices. The package also contains several minimum run response surface designs (stored as matrices) that are not available in other R packages.


Introduction
Response surface methods consist of (1) experimental designs for collecting data to fit an approximate relationship between the factors and the response, (2) regression analyses for fitting the model and (3) graphical and numerical techniques for examining the fitted model to identify the optimum.The model normally used in response surface analysis is a second order polynomial, as shown in Equation (1).
The fitted equation is examined in order to predict the factor coordinates of the maximum or minimum response within the experimental region, or to simply explore the relationship between the factors and response.
Since it is not known in advance what neighborhood will be of most interest in the design space, a desirable response surface design will be one that makes the variance of a predicted value as uniform as possible throughout the experimental region.Standard response surface designs, such as the uniform precision central composite design, are constructed so that the variance of a predicted value will be near constant within a coded radius of one from the center of the design.
One way to visualize the uniformity of the variance of a predicted value for designs with more than two factors is to use the variance dispersion graph proposed by Myers et al. (1992).

Variance of a predicted value
The variance of a predicted value at a point (x 1 , • • • , x k ) in the experimental region is given by Equation ( 2) where X is the design matrix for the quadratic model in Equation (1), σ 2 is the variance of the experimental error, and is a vector valued function of the coordinates (of the point in the experimental region) whose elements correspond to the columns of the design matrix X.
For the face-centered cube design, or 3 2 design shown in Table 1, Figure 1 is a contour plot of the scaled variance of a predicted value in the range of −1.5 ≤ x 1 ≤ 1.5, −1.5 ≤ x 2 ≤ 1.5.The scaled variance of a predicted value is NVar[ ŷ(x)]/σ 2 , where N is the number of points in the experimental design.the line x 2 = −x 1 .This is easy to visualize in two dimensions, but would be more difficult to see in higher dimensions.

Variance dispersion graphs
A variance dispersion graph allows one to visualize the uniformity of the scaled variance of a predicted value in multidimensional space.It consists of three curves: the maximum, the minimum and the average scaled variance of a predicted value on a hypersphere.Each value is plotted against the radius of the hypersphere.Figure 2 shows the variance dispersion graph of the design shown in Table 1.
In this figure it can be seen that the maximum scaled variance of a predicted value is near 14 at a radius of 1.4 in coded units, while the minimum scaled variance is less than 10 at the same radius.This is the same phenomenon that can be seen in the contour plot of the scaled variance of a predicted value shown in Figure 1.The path of the maximum and minimum variance through the design space will be determined by the design and may not follow straight lines as shown in the specific example in this contour plot.  1.
Unlike the contour plot of the scaled prediction variance, the variance dispersion graph has the same format for a k dimensional response surface design as for a two dimensional design like Table 1.
Recent textbooks such as Montgomery (2005), Myers et al. (2009), and Lawson (2010) illustrate variance dispersion graphs as a tool for judging the merits of a response surface design.These graphs can be produced in commercial software such as SAS ADX (see SAS Institute Inc., 2010) and Minitab (see Minitab Inc., 2010) by using a downloadable macro (see Santiago, 2009).Vining (1993a), and Vining (1993b) published FOR-TRAN code for creating variance dispersion graphs.Vining's code obtains the maximum and minimum prediction variance on hyperspheres using a combination of a grid search and Nelder-Mead search as described by Cook and Nachtsheim (1980).The package Vdgraph (Lawson, 2011) incorporates this code in R functions that make the graphs.

The Vdgraph package
The package includes the function Vdgraph for making a variance dispersion graph of one design and the function Compare2Vdg for comparing the variance dispersion graphs of two designs on the same plot.The package also includes several minimum run response surface designs stored as matrices.These include Hartley's small composite design for 2 to 6 factors, Draper and Lin's small composite design for 5 factors, the hexagonal rotatable design for 2 factors and Roquemore's hybrid designs for 3 to 6 factors.

Examples
The first example shown below illustrates the use of the R function Vdgraph to make variance dispersion graphs of a three factor Box-Behnken design created by the bbd function in the R package rsm (see Lenth, 2009).The result from the first example (shown above) includes a listing of the coordinates of the plot and the graph shown in Figure 3.
The second example illustrates the use of Compare2Vdg by comparing the variance dispersion graph of Draper and Lin's small composite design for 5 factors (SCDDL5) (Draper and Lin, 1990) with Hartley's Small Composite Design (SCDH5) (Hartley, 1959).Hartley's small composite design requires only 28 runs by utilizing a 1 2 fraction of the factorial portion of the design.

Run
x  2 with α = 1.86121) further reduces the number of runs to 23, by substituting a 12 run Plackett-Burman design in the factorial portion, its variance dispersion graph reveals that the variance of a predicted value is not nearly as uniform as it is for the Hartley's design.As seen in Figure 4, Hartley's small composite design for 5 factors is rotatable since the three blue curves for the max, min and average scaled prediction variance coincide.The scaled variance of a predicted value for Hartley's design is near the minimum scaled variance of a predicted value for Draper and Lin's design throughout the experimental region.

Figure 1 :
Figure 1: Contour plot of NVar[ ŷ(x)]/σ 2As seen in Figure1, the variance of a predicted value increases faster along the line x 2 = 0 than along
Figure Comparison of Two Variance DispersionGraphs.

Table 2 :
Draper and Lin"s Small Composite Design for 5 Factors Although Draper and Lin's design (shown in Table