|
SAS:
data ex;
input x1 x2 x3 x4 y ;
label x1=”温度/℃” x2=”时间/h” x3=”底物浓度/%”
x4=”[E]/[S]/%”;
cards;
50 5.5 4.5 11.43
50 5.5 3.5 16.74
50 4.5 4.5 18.63
50 4.5 3.5 17.03
30 5.5 4.5 5.94
30 5.5 3.5 5.94
30 4.5 4.5 3.89
30 4.5 3.5 1.8
57 5 4 12.75
23 5 4 0.26
40 5.8 4 6.5
40 4.2 4 10.61
40 5 4.8 12.21
40 5 3.2 5.37
40 5 4 16.64
40 5 4 12.1
40 5 4 13.43
40 5 4 16.54
40 5 4 12.67
40 5 4 12.9
;
proc rsreg data = ex out = two;
model y = x1-x4 /lackfit;
run;
ods graphics on;
proc rsreg data=ex
/*plots( unpack)=surface(3d );*/
plots= (ridge surface(unpack));
model y=x1-x4/lackfit;
run;
ods graphics off;
data ex2;
do x1=-1 to 1 by 0.08; do x2=-1 to 1 by 0.08; x3=0; x4=0;
y= 286.467+ x1*1.05+23.475*x2+12.100*x3+25.125*x4 -22.025*x1*x1-1.275*x2*x1-25.387*x2*x2+6.325*x3*x1+4.375*x3*x2-9.125*x3*x3+10.35*x4*x1+
2.275*x4*x2+2.30*x4*x3-20.16*x4*x4;
output;
end; /*–每个do对应一个end–*/
end;
proc gcontour;
plot x1*x2=y; /*–等高线图–*/
run;
proc G3GRID data=ex2;
GRID x2*x1=y/spline
Axis1=-1 to 1 by 0.1
Axis2= -1 to 1 by 0.1;
proc g3d; /*–绘制三维图–*/
plot x1*x2=y/ rotate=45;
run;
|