SLIDE 13 ST 516 Experimental Statistics for Engineers II
Response surface When both A and B are quantitative, the regression equation can be used to predict the expected response at other values of the factors:
yield <- within(yield, {cA = coded(A); cB = coded(B)}) yieldLm <- lm(Yield ~ cA * cB, data = yield) ngrid <- 20 Agrid <- Bgrid <- seq(from = -1, to = 1, length = ngrid) yhat <- predict(yieldLm, expand.grid(cA = Agrid, cB = Bgrid)) yhat <- matrix(yhat, length(Agrid), length(Bgrid)) persp(Agrid, Bgrid, yhat, theta = -40, phi = 30) # in real values: persp(20 + 5 * Agrid, 1.5 + 0.5 * Bgrid, yhat, theta = -40, phi = 30, ticktype = "d", xlab = "Reactant Concentration", ylab = "Catalyst")
13 / 13 The 2k Factorial Design The 22 Design