5036℃

# F R R R

abn1 abn1
ijkl ijkl
αi 0bn1   0bn1
βj a1n1   a1n1
(αβ)ij 01n1   01n1
δk ab11   ab11
(αδ)ik 0b11   1111
(βδ)jk a111
(αβδ)ijk 0111
ε(ijk)l 1111

例 2.13  课本上表9－11中的实验，共需32名同质受试者，因32名同质受试者很难找到，因此将实验的两个重复安排为两个区组，每一区组只要16名同质受试者即可。

options  linesize = 76;

data  work;

infile  ‘a:2-7data.dat’;

input  block  a  b  energy  @@;

run;

proc  anova;

class  block  a  b;

model  energy = block  a  b  a*b;

test  h = a  e = a*b;

means  a / duncan  e = a*b;

run;

The SAS System

Analysis of Variance Procedure

Class Level Information

 Class Levels Values BLOCK 2 1 2 A 4 1 2 3 4 B 4 1 2 3 4

Number of observations in data set = 32

The SAS System

Analysis of Variance Procedure

Dependent Variable: ENERGY

 Sum of Mean Source DF Squares Square F Value Pr > F Model 16 13.1329000 0.8208062 8.16 0.0001 Error 15 1.5083875 0.1005592 Corrected Total 31 14.6412875

 R-Square C.V. Root MSE ENERGY Mean 0.896977 14.32864 0.31711 2.21313

 Source DF Anova SS Mean Square F Value Pr > F BLOCK 1 0.27751250 0.27751250 2.76 0.1174 A 3 3.99633750 1.33211250 13.25 0.0002 B 3 0.45056250 0.15018750 1.49 0.2567 A*B 9 8.40848750 0.93427639 9.29 0.0001

Tests of Hypotheses using the Anova MS for A*B as an error term

 Source DF Anova SS Mean Square F Value Pr > F A 3 3.99633750 1.33211250 1.43 0.2982

The SAS System

Analysis of Variance Procedure

Duncan’s Multiple Range Test for variable: ENERGY

NOTE: This test controls the type I comparisonwise error rate, not

the experimentwise error rate

Alpha=0.05  df=9  MSE=0.934276

 Number of Means 2 3 4 Critical Range 1.093 1.141 1.169

Means with the same letter are not significantly different.

 Duncan Grouping Mean N A A 2.6400 8 4 A A 2.2900 8 1 A A 2.2650 8 2 A A 1.6575 8 3

2.5.5  裂区实验设计的方差分析

# R   F   F   R

均方期望
abcn
ijkl

βj a0c1
(αβ)ij 10c1

(αγ)ik 1b01
(βγ)jk a001
(αβγ)ijk 1001
ε(ijk)l 1111

例 2.14  假设课本上表9－11中的实验是一个裂区实验，共有3个区组，在每一工作速度下（主处理A＝4）安排不同受试时间（次处理B＝5）。写出SAS程序并输出结果。

options  linesize = 76;

data  split;

infile  ‘a: 2-8data.dat’;

input  block  b  c  energy  @@;

run;

proc  anova;

class  block  b  c;

model  energy = block  b  c  block*b  block*c  b*c  block*b*c;

test  h = b  e = block*b ;

test  h = c  e = block*c;

test  h = b*c  e = block*b*c;

run;

The SAS System

Analysis of Variance Procedure

Class Level Information

 Class Levels Values BLOCK 2 1 2 B 4 1 2 3 4 C 4 1 2 3 4

Number of observations in data set = 32

The SAS System

Analysis of Variance Procedure

Dependent Variable: ENERGY

 Sum of Mean Source DF Squares Square F Value Pr > F Model 31 14.6412875 0.4722996 . . Error 0 . . Corrected Total 31 14.6412875

 R-Square C.V. Root MSE ENERGY Mean 1.000000 0 0 2.21313

 Source DF Anova SS Mean Square F Value Pr > F BLOCK 1 0.27751250 0.27751250 . . B 3 3.99633750 1.33211250 . . C 3 0.45056250 0.15018750 . . BLOCK*B 3 0.19203750 0.06401250 . . BLOCK*C 3 0.12271250 0.04090417 . . B*C 9 8.40848750 0.93427639 . . BLOCK*B*C 9 1.19363750 0.13262639 . .

Tests of Hypotheses using the Anova MS for BLOCK*B as an error term

 Source DF Anova SS Mean Square F Value Pr > F B 3 3.99633750 1.33211250 20.81 0.0164

Tests of Hypotheses using the Anova MS for BLOCK*C as an error term

 Source DF Anova SS Mean Square F Value Pr > F C 3 0.45056250 0.15018750 3.67 0.1569

Tests of Hypotheses using the Anova MS for BLOCK*B*C as an error term

 Source DF Anova SS Mean Square F Value Pr > F B*C 9 8.40848750 0.93427639 7.04 0.0038

2.5.6  套设计的方差分析

根据因素数的不同，套设计可分为二因素（二级）、三因素（三级）¼等套设计，这里只举出一个二级套设计的例子，说明二级套设计方差分析的SAS程序。二级套设计的统计模型如下：

R   R   R

i    j    k

ai      1   b    n        s2 + ns2b + bns2a

bj(i)      1   1          s2 + ns2b

ek(ij)      1   1    1        s2

例 2.15  随机选取3株植物，在每一株内随机选取两片叶子（嵌套在植株因素下的第二个因素），用取样器从每一片叶子上选取同样面积的两个样本（两次重复），称取湿重。对以上结果进行方差分析。

options  linesize = 76;

data  nested;

input  plant  \$  leaf  wt  @@;

cards;

a  1  12.1  a  1  12.1  b  1  14.4  b  1  14.4  c  1  23.1  c  1  23.4

a  2  12.8  a  2  12.8  b  2  14.7  b  2  14.5  c  2  28.1  c  2  28.8

proc  anova;

class  plant leaf ;

model  wr = plant  leaf (plant);

test  h = plant  e = leaf (plant);

run;

The SAS System

Analysis of Variance Procedure

Class Level Information

 Class Levels Values PLANT 3 a b c LEAF 2 1 2

Number of observations in data set = 12

The SAS System

Analysis of Variance Procedure

Dependent Variable: WT

 Sum of Mean Source DF Squares Square F Value Pr > F Model 5 444.350000 88.870000 1720.06 0.0001 Error 6 0.310000 0.051667 Corrected Total 11 444.660000

 R-Square C.V. Root MSE WT Mean 0.999303 1.291494 0.22730 17.6000

 Source DF Anova SS Mean Square F Value Pr > F PLANT 2 416.780000 208.390000 4033.35 0.0001 LEAF(PLANT) 3 27.570000 9.190000 177.87 0.0001

Tests of Hypotheses using the Anova MS for LEAF(PLANT) as an error term

 Source DF Anova SS Mean Square F Value Pr > F PLANT 2 416.780000 208.390000 22.68 0.0155

2.5.7  正交设计的方差分析

• 在线沟通，请点我在线咨询

• 咨询热线：
13261671783
客服qq：
3285157825