|
|
楼主

楼主 |
发表于 2007-8-2 17:44:21
|
只看该作者
超级菜鸟求助弱弱问题:)
下面是两方差分析程序,差别只在分析时候第二个程序多了交互作用检验问什么之前的 c的检验值都不同了(用加粗注明了),其他也有不同冒是自由度不同..菜鸟实在想不通请教达人:)
data anova1;
input a b c @@;
do i=1 to 3;
input x @@;
output;
end;
cards;
1 1 1 0.7069 0.7854 0.3581
1 1 2 0.0785 0.1885 0.3403
1 2 1 1.0838 0.9425 0.3335
1 2 2 0.5027 0.9550 0.9215
2 1 1 0.0628 0.0942 0.0471
2 1 2 0.0126 0.0126 0.0094
2 2 1 0.4712 0.0880 0.1759
2 2 2 0.2246 0.2513 0.3676
;
proc anova;
class a b c;
model x=a b c ;
run;
[b:5a6f0]结果[/b:5a6f0]
SAS 系统 15:41 Friday, March 19, 2004 14
The ANOVA Procedure
Dependent Variable: x
Sum of
Source DF Squares Mean Square F Value Pr > F
[b:5a6f0] Model 3 1.82090604 0.60696868 13.36 <.0001
Error 20 0.90880888 0.04544044
Corrected Total 23 2.72971491
R-Square Coeff Var Root MSE x Mean
0.667068 56.75642 0.213168 0.375583[/b:5a6f0]
Source DF Anova SS Mean Square F Value Pr > F
a 1 1.20574768 1.20574768 [b:5a6f0]26.53 [/b:5a6f0]<.0001
b 1 0.54637873 0.54637873 [b:5a6f0]12.02 [/b:5a6f0][b:5a6f0]0.0024[/b:5a6f0]
c 1 0.06877963 0.06877963 [b:5a6f0]1.51 [/b:5a6f0][b:5a6f0]0.2329[/b:5a6f0]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
data anova1;
input a b c @@;
do i=1 to 3;
input x @@;
output;
end;
cards;
1 1 1 0.7069 0.7854 0.3581
1 1 2 0.0785 0.1885 0.3403
1 2 1 1.0838 0.9425 0.3335
1 2 2 0.5027 0.9550 0.9215
2 1 1 0.0628 0.0942 0.0471
2 1 2 0.0126 0.0126 0.0094
2 2 1 0.4712 0.0880 0.1759
2 2 2 0.2246 0.2513 0.3676
;
proc anova;
class a b c;
model x=a b c a*b a*c b*c a*b*c;
run;
[b:5a6f0]结果[/b:5a6f0]
SAS 系统 15:41 Friday, March 19, 2004 14
The ANOVA Procedure
Dependent Variable: x
Sum of
[b:5a6f0] Source DF Squares Mean Square F Value Pr > F
Model 7 2.05341195 0.29334456 6.94 0.0007
Error 16 0.67630296 0.04226893
Corrected Total 23 2.72971491
R-Square Coeff Var Root MSE x Mean
0.752244 54.73994 0.205594 0.375583[/b:5a6f0]
Source DF Anova SS Mean Square F Value Pr > F
a 1 1.20574768 1.20574768 [b:5a6f0]28.53 [/b:5a6f0]<.0001
b 1 0.54637873 0.54637873 [b:5a6f0]12.93 [/b:5a6f0][b:5a6f0]0.0024[/b:5a6f0]
c 1 0.06877963 0.06877963 [b:5a6f0]1.63 [/b:5a6f0][b:5a6f0]0.2203[/b:5a6f0]
a*b 1 0.03692642 0.03692642 0.87 0.3639
a*c 1 0.05631828 0.05631828 1.33 0.2653
b*c 1 0.09886801 0.09886801 2.34 0.1457
a*b*c 1 0.04039321 0.04039321 0.96 0.3428 |
|