library(rsm)
CR = coded.data (ChemReact, x1~(Time-85)/5, x2~(Temp-175)/5)
### 1st-order model, using only the first block
CR.rs1 = rsm (Yield ~ FO(x1,x2), data=CR, subset=1:7)
summary(CR.rs1)
### 2nd-order model, using both blocks
CR.rs2 = rsm (Yield ~ Block + SO(x1,x2), data=CR)
summary(CR.rs2)
Run the code above in your browser using DataLab