多因素方差分析
*1、随机区组设计
例4-4 某研究者采用随机区组设计进行实验,比较三种抗癌药物对小白鼠肉瘤抑瘤效果,先将15只染有肉瘤小白鼠按体重大小配成5个区组,每个区组内3只小白鼠随机接受三种抗癌药物,以肉瘤的重量为指标,试验结果见表。问三种不同的药物的抑瘤效果有无差别?
不同药物作用后小白鼠肉瘤重量(g)
区组
| A药
| B药
| C药
|
1
| 0.82
| 0.65
| 0.51
|
2
| 0.73
| 0.54
| 0.23
|
3
| 0.43
| 0.34
| 0.28
|
4
| 0.41
| 0.21
| 0.31
|
5
| 0.68
| 0.43
| 0.24
|
| | | | |
用Two-way ANOVA 分析。
data ex4_4;
input r c x @@;
cards;
1 1 .82
1 2 .65
1 3 .51
: : :
;
proc anova;
class r c;
model x=r c;
means c/snk;
run;
Dependent Variable: X
Source DF Sum of Squares Mean Square F Value Pr > F
Model 6 0.45636000 0.07606000 7.96 0.0050
Error 8 0.07640000 0.00955000
Corrected Total 14 0.53276000
R-Square C.V. Root MSE X Mean
0.856596 21.52513 0.097724 0.45400000
Source DF Anova SS Mean Square F Value Pr > F
R 4 0.22836000 0.05709000 5.98 0.0158
C 2 0.22800000 0.11400000 11.94 0.0040
Student-Newman-Keuls test for variable: X
NOTE: This test controls the type I experimentwise error rate under the complete null hypothesis but not under partial null hypotheses.
Alpha= 0.05 df= 8 MSE= 0.00955
Number of Means 2 3
Critical Range 0.142524 0.1766063
Means with the same letter are not significantly different.
SNK Grouping Mean N C
A 0.61400 5 1
B 0.43400 5 2
B
B 0.31400 5 3
H0:μ1=μ2=μ3,即三种药物作用后小白鼠肉瘤重量的总体均数相等。
H1:即三种药物作用后小白鼠肉瘤重量的总体均数不全相等。
α=0.05
经计算得:F=11.94 P=0.0040
按α=0.05水准,拒绝H0,接受H1,有统计学意义.可以认为三种药物作用后小白鼠肉瘤重量的总体均数不全相等,即不同药物的抑瘤效果有差别。C药和B药抑瘤效果无明显差别,但和A药差异明显。C药抑瘤效果最好。
*如不满足正态分布或方差不齐,选非参Friedman M检验
2、两阶段交叉设计
例4_6下表是A、B两种闪烁液测定血浆中3H-cGMP的交叉试验结果。第I阶段1、3、4、7、9号用A测定,2、5、6、8、10号用B测定;第II阶段1、3、4、7、9号用B测定,2、5、6、8、10号用A测定。试对交叉试验结果进行方差分析。
两种闪烁液测定血浆中3H-cGMP的交叉试验
受试者
| 阶 段
| 合计
Bi
|
Ⅰ
| Ⅱ
|
1
| A(760)
| B(770)
| 1530
|
2
| B(860)
| A(855)
| 1715
|
3
| A(568)
| B(602)
| 1170
|
4
| A(780)
| B(800)
| 1580
|
5
| B(960)
| A(958)
| 1918
|
6
| B(940)
| A(952)
| 1892
|
7
| A(635)
| B(650)
| 1285
|
8
| B(440)
| A(450)
| 890
|
9
| A(528)
| B(530)
| 1058
|
10
| B(800)
| A(803)
| 1603
|
各阶段合计
A、B合计
| S1=7271
SA=7289
| S2=7370
SB=7352
| 14641(∑X)
|
data ex4_6;
input no x12 xab$ x @@;
cards;
1 1 A 760
2 1 B 860
: : : :
1 2 B 770
2 2 A 855
: : : :
;
proc anova;
class no x12 xab;
model x=no x12 xab;
mean no x12 xab;
run;
Dependent Variable: X
Source DF Sum of Squares Mean Square F Value Pr > F
Model 11 551799.95000000 50163.63181818 1015.97 0.0001
Error 8 395.00000000 49.37500000
Corrected Total 19 552194.95000000
R-Square C.V. Root MSE X Mean
0.999285 0.959871 7.026734 732.05000000
Source DF Anova SS Mean Square F Value Pr > F
NO 9 51111.45000000 61234.60555556 1240.19 0.0001
X12 1 490.05000000 490.05000000 9.93 0.0136
XAB 1 198.45000000 198.45000000 4.02 0.0799
H0:μa=μb
H1:μa≠μb
α=0.05
经计算得:受试者间 F=1240.19 P=0.0001; 两阶段间 F=9.93 P=0.0136
A、B闪烁液 F=4.02 P= 0.0799
结论:①还不能认为A和B良种闪烁液的测量结果有差异。②可认为测定阶段对测量结果有影响。③可认为个受试者的3H-cGMP值不同。
3、析因设计2*2
将12例高胆固醇病人随机分成四组,用不同疗法治疗。
第一组用一般疗法,第二组用一般疗法外加用甲药,第三组用一般疗法外加用乙药,
第四组用一般疗法外加用甲药和乙药。一个月后,观察胆固醇降低数(mg%)见下表。
问甲、乙两药是否有降低胆固醇的作用?两药有无协同作用?第一组
| 第二组
| 第三组
| 第四组
|
16
| 56
| 28
| 64
|
25
| 44
| 31
| 78
|
18
| 42
| 23
| 80
|
data f22;
input a b x @@;
cards;
0 0 16
: : :
1 0 56
: : :
0 1 28
: : :
1 1 80
;
proc anova;
class a b;
model x=a b a*b;
mean a b a*b;
run;
Dependent Variable: X
Source DF Sum of Squares Mean Square F Value Pr > F
Model 3 5298.91666667 1766.30555556 41.08 0.0001
Error 8 344.00000000 43.00000000
Corrected Total 11 5642.91666667
R-Square C.V. Root MSE X Mean
0.939039 15.58203 6.557438 42.08333333
Source DF Anova SS Mean Square F Value Pr > F
A 1 4144.08333333 4144.08333333 96.37 0.0001
B 1 884.08333333 884.08333333 20.56 0.0019
A*B 1 270.75000000 270.75000000 6.30 0.0364
Level of --------------X--------------
A B N Mean SD
0 0 3 19.6666667 4.72581563
0 1 3 27.3333333 4.04145188
1 0 3 47.3333333 7.57187779
1 1 3 74.0000000 8.71779789
H0:
H1:
α=0.05
经计算得:A F= P=; B F= P=
A*B F= P=
结论:甲、乙两药有降胆固醇作用,且两药之间有协同作用。
交互作用:当某因素的各个单独效应随另一因素变化而变化时,则称这两个因素间存在交互作用。析因实验分析全部交互作用。
4、析因设计3*3
例11_2 观察A,B两种镇痛药物联合运用在产妇分娩时的镇痛效果。A药取3个剂量:1mg,2.5mg,3mg;B药也取3个剂量:5 ,15 ,30 。共9个处理组。将27名产妇随机等分为9组,每组3名产妇,记录每名产妇分娩时的镇痛时间,结果见表。试分析A,B两药联合运用的镇痛效果。
A,B两药联合运用的镇痛时间(min)
A药物剂量
| B药物剂量
|
5
| 15
| 30
|
|
| 105
| 115
| 75
|
1.0 mg
| 80
| 105
| 95
|
| 65
| 80
| 85
|
| 75
| 125
| 135
|
2.5 mg
| 115
| 130
| 120
|
| 80
| 90
| 150
|
| 85
| 65
| 180
|
5.0 mg
| 120
| 120
| 190
|
| 125
| 100
| 160
|
data ex11_2;
input x a b @@;
cards;
105 1 1
80 1 1
65 1 1
: : :
;
proc anova;
class a b;
model x=a b a*b;
mean a b a*b/snk;
/*proc anova;
class a b;
model x=a|b;
mean a|b/snk;*/
run;
Dependent Variable: X
Source DF Sum of Squares Mean Square F Value Pr > F
Model 8 21466.66666667 2683.33333333 6.92 0.0003
Error 18 6983.33333333 387.96296296
Corrected Total 26 28450.00000000
R-Square C.V. Root MSE X Mean
0.754540 17.90616 19.696775 110.00000000
Source DF Anova SS Mean Square F Value Pr > F
A 2 6572.22222222 3286.11111111 8.47 0.0026
B 2 7022.22222222 3511.11111111 9.05 0.0019
A*B 4 7872.22222222 1968.05555556 5.07 0.0065
Student-Newman-Keuls test for variable: X
Alpha= 0.05 df= 18 MSE= 387.963
Number of Means 2 3
Critical Range 19.507379 23.697218
Means with the same letter are not significantly different.
SNK Grouping Mean N A
A 127.222 9 3
A
A 113.333 9 2
B 89.444 9 1
SNK Grouping Mean N B
A 132.222 9 3
B 103.333 9 2
B
B 94.444 9 1
Level of Level of --------------X--------------
A B N Mean SD
1 1 3 83.333333 20.2072594
1 2 3 100.000000 18.0277564
1 3 3 85.000000 10.0000000
2 1 3 90.000000 21.7944947
2 2 3 115.000000 21.7944947
2 3 3 135.000000 15.0000000
3 1 3 110.000000 21.7944947
3 2 3 95.000000 27.8388218
3 3 3 176.666667 15.2752523
结论:①A药不同剂量的镇痛效果不同;②B药不同剂量的镇痛效果不同 ③A,B量药有交互作用,A药5.0 mg和B药30 时,镇痛时间持续最长。
5、析因设计5*2*2
例11_3用5×2×2析因设计研究5种类型的军装在两种环境、两种活动状态下的散热效果,观察指标是受试者的主观热感觉(从冷到热按等级评分),结果见表。试进行方差分析。 战士的主观热感觉
环境 活动状态 军 装 类 型
0.25 0.30 0.75 0.20 -0.10
-0.25 0.10 -0.50 -1.00 0.00
静坐 1.25 0.50 0.60 0.85 2.50
( ) -0.75 -0.35 0.40 -0.50 0.10
0.40 0.05 -0.20 0.90 -0.10
干燥
( )
4.75 4.60 4.55 4.25 4.725
3.45 4.80 3.50 3.10 4.30
活动 4.00 4.00 4.25 4.00 4.10
( ) 4.85 5.20 4.10 5.00 4.80
-4.55 4.30 4.40 4.20 3.60
0.50 1.50 0.75 -0.75 1.75
2.10 1.50 2.65 0.90 2.40
静坐 2.75 1.25 3.00 0.95 1.75
( ) 1.00 1.37 0.05 0.625 3.05
2.35 2.55 1.17 1.05 2.75
潮湿
( )
3.75 4.00 4.10 3.275 4.80
4.00 4.05 5.00 4.25 4.02
活动 4.00 4.15 4.20 4.00 4.15
( ) 4.25 4.10 4.15 4.25 4.75
4.60 4.25 4.175 4.25 4.80
data ex11_3;
input b c a x @@;
cards;
1 1 1 0.25 1 1 1 -0.25 1 1 1 1.25 1 1 1 -0.75 1 1 1 0.40
: : : : : :
2 2 5 4.80 2 2 5 4.02 2 2 5 4.15 2 2 5 4.75 2 2 5 4.80
;
proc anova;
class a b c;
model x=a b c a*b a*c b*c a*b*c;
run;
Dependent Variable: X
Source DF Sum of Squares Mean Square F Value Pr > F
Model 19 316.20580400 16.64241074 38.72 0.0001
Error 80 34.38446000 0.42980575
Corrected Total 99 350.59026400
R-Square C.V. Root MSE X Mean
0.901924 25.50361 0.655595 2.57060000
Source DF Anova SS Mean Square F Value Pr > F
A 4 5.20898650 1.30224662 3.03 0.0222
B 1 9.92880100 9.92880100 23.10 0.0001
C 1 283.34988900 283.34988900 659.25 0.0001
A*B 4 1.94127150 0.48531788 1.13 0.3488
A*C 4 1.47950850 0.36987713 0.86 0.4914
B*C 1 12.68784400 12.68784400 29.52 0.0001
A*B*C 4 1.60950350 0.40237588 0.94 0.4474
结论:不同军装、不同环境和不同活动状态的主观热感觉的主效应都有差别,但尚不能认为军装类型的主观感觉与其它两个试验因素存在交互作用。进一步分析表中A因素各水平的小计,第4 种类型军装有散热效果,第五种类型的军装有保温效果,其余三种介于两者之间。