Dear Jim,
>GenStat has nice procedures for generating response surface designs but
>I cannot find any analysis examples for such experiments.
Further to Roger's suggestion, here is the RQUADRATIC example plus a
section I've added to plot the fitted surface.
CAPTION 'RQUADRATIC example',\
'Second-order Ranitidine experiment (Wu & Hamada 2000, Table 9.12)';\
STYLE=meta,plain
VARIATE [VALUES=0,1,-1.41,0,0,0,1,1.41,0,0,-1,-1,0] A
& [VALUES=-1.41,-1,0,0,0,0,1,0,1.41,0,-1,1,0] B
& [VALUES=6.943,6.248,2.100,2.034,2.009,2.022,\
3.252,9.445,1.781,1.925,2.390,2.066,2.113] lnCEF
PRINT A,B,lnCEF; DECIMALS=2,2,3
MODEL lnCEF
RQUADRATIC A,B
"Refit quadratic so as to form predictions"
CALC AB = A*B
FIT POL(A;2)+POL(B;2)+ AB
"Note POL(A;2)*POL(B;2) has unwanted terms A**2*B**2 etc"
SCALAR n; 50
CALC XA,XB = MIN(A,B) + RANGE(A,B)*!(0...n)/n
MATRIX [ROW=XA;COL=XB] MPred "Matrix to hold predictions"
FOR [NTIMES=n+1;INDEX=i]
CALC a = XA$[i]
CALC ab = a*XB
PREDICT [PRINT=*;PRED=Pred;SE=SE] A,B,AB; LEVELS=a,XB,ab; PARALLEL=*,*,B
CALC MPred$[*;i] = TCOLUMN(Pred) "Put table into matrix column"
ENDFOR
PEN 2,3; COLOUR='red','blue'
DCONTOUR MPred; NCONTOURS=30; PENFILL=0 "!(2,3)"
Regards, David.
______________________________________________
Dr David Baird Statistical Consultant and GenStat Developer
VSN (NZ) Limited ([log in to unmask]) www.GenStat.com
40 McMahon Drive, Aidanfield, Christchurch, New Zealand
Ph +64 3 335-0588 Cell +64 21 1160803
|