Comparing Points on a Response Surface

On occasion, it is useful to compare the value of Z at different points on a response surface. This can be accomplished by writing polynomial regression equations in terms of the X and Y values that correspond to the surface points to be compared, taking the difference between the equations, and testing the resulting linear combination of coefficients.

To illustrate, assume that the two points to be compared are labeled Za and Zb and have X and Y coordinates of Xa,Ya and Xb,Yb, respectively. The value for Za is found by substituting the values corresponding to Xa and Ya into the polynomial regression equation after it has been estimated in the usual manner, with X, Y, X2, XY, and Y2 as continuous variables. The value for Za is:

(1)     Za = b0 + b1Xa + b2Ya + b3Xa2 + b4XaYa + b5Ya2.

Likewise, the value for Zb is:

(2)     Zb = b0 + b1Xb + b2Yb + b3Xb2 + b4XbYb + b5Yb2.

Note that Eqs. 1 and 2 omit the residual term e, given that Za and Zb are points on the estimated response surface and therefore represent Z-hat values. Now, to find the difference between Za and Zb, we subtract Eq. 2 from Eq. 1:

(3)     Za – Zb = b0 + b1Xa + b2Ya + b3Xa2 + b4XaYa + b5Ya2 – b0 – b1Xb – b2Yb – b3Xb2 – b4XbYb – b5Yb2.

Simplifying and collecting like terms yields:

(4)     Za – Zb = b1(Xa – Xb) + b2(Ya – Yb) + b3(Xa2 – Xb2) + b4(XaYa – XbYb) + b5(Ya2 – Yb2).

In Eq. 4, the differences in the parentheses following each coefficient are numbers that can be computed based on the values chosen for Xa,Ya and Xb,Yb. These numbers become weights on the coefficients, and the resulting weighted linear combination of coefficients can be tested using the LMATRIX in the GLM procedure of SPSS, the postestimation test command in STATA, or procedures in other programs that can test weighted linear combinations of regression coefficients.

As a concrete example, suppose that Xa and Ya were 2 and 2 and Xb and Yb were -2 and -2, such that Za and Zb correspond to two different points along the Y = X line. Substituting these values into Eq. 4 yields:

(5)     Za – Zb = b1[2 – (-2)] + b2[2 – (-2)] + b3[22 – (-2)2] + b4[2*2 – (-2)*(-2)] + b5[22 – (-2)2].

Squaring and multiplying the relevant numbers within the brackets and parentheses yields:

(6)     Za – Zb = b1(2 + 2) + b2(2 +2) + b3[4 – 4] + b4[4 – 4] + b5[4 – 4].

Summing the terms in the parentheses and expressing the resulting numbers as weights yields:

(7)     Za – Zb = 4b1 + 4b2.

To test the null hypothesis that Za – Zb = 0, test the weighted linear combination 4b1 + 4b2 = 0, which simplifies to b1 + b2 = 0. Note that this expression is the same as that used to test the slope of the surface along the Y = X line where X and Y equal zero, which is the midpoint of the Y = X line.

As a more general example, let us compare Za and Zb at points that are more arbitrary than those that fall along the Y = X line. For illustration, let Xa and Ya equal -1 and 2, respectively, and let Xb and Yb were -2 and 3. Substituting these values into Eq. 4 yields:

(8)     Za – Zb = b1[-1 – (-2)] + b2(2 – 3) + b3[-12 – (-2)2] + b4[-1*2 – (-2)3] + b5(22 – 32).

Squaring and multiplying the relevant numbers within the brackets and parentheses yields:

(9)     Za – Zb = b1(-1 + 2) + b2(2 – 3) + b3(1 – 4) + b4(-2 + 6) + b5(4 – 9).

Summing the terms in the parentheses and expressing the resulting numbers as weights yields:

(10)    Za – Zb = b1 – b2 – 3b3 + 4b4 – 5b5.

Again, this weighted linear combination of coefficients can be tested in SPSS, STATA, or other statistical packages that can test weighted linear combinations of regression coefficients.