sas编程,急用!!
sas编程,急用!!
我这有一组四因素三水平的正交实验结果,要进行方差分析,需建立sas程序。我编了一个,但是结果不行。哪位大侠帮帮忙,指正指正!!
正交结果:
1 1:15 3.0 80 60 5.02
2 1:15 4.0 100 90 7.42
3 1:15 5.0 120 120 14.11
4 1:20 3.0 100 120 13.16
5 1:20 4.0 120 60 14.76
6 1:20 5.0 80 90 4.75
7 1:30 3.0 120 90 16.36
8 1:30 4.0 80 120 7.64
9 1:30 5.0 100 60 9.47
k1 8.850 11.513 5.803 9.750 T=92.69
k2 10.890 9.940 10.017 9.510
k3 11.157 9.443 15.077 11.637
R 2.307 2.070 9.274 2.127
sas自编程序:
data dx;
input x1 x2 x3 x4 y;
cards;
1 1 1 1 5.02
1 2 2 2 7.04
1 3 3 3 14.11
2 1 2 3 13.16
2 2 3 1 14.76
2 3 1 2 4.75
3 1 3 2 16.36
3 2 1 3 7.64
3 3 2 1 9.47
;
proc anova;
class x1 x2 x3 x4;
model y=x1 x2 x3 x4;
means x1 x2 x3 x4;
run;
运行结果:
Analysis of Variance Procedure
Dependent Variable: Y
Source DF Sum of Squares Mean Square F Value Pr > F
Model 8 5.79920000 0.72490000 . .
Error 0 . .
Corrected Total 8 5.79920000
R-Square C.V. Root MSE Y Mean
1.000000 0 5.83666667
Source DF Anova SS Mean Square F Value Pr > F
X1 2 0.41086667 0.20543333 . .
X2 2 0.10806667 0.05403333 . .
X3 2 4.44740000 2.22370000 . .
X4 2 0.83286667 0.41643333 . .