99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線電話:13121318867

登錄
2018-10-17 閱讀量: 3342
用R進(jìn)行二因素隨機(jī)區(qū)組方差分析及其多重比較的實(shí)現(xiàn)

例子:玉米品種A有4個(gè)水平,分別是A1-A4,施肥B有兩個(gè)水平,分別是B1-B2,重復(fù)三次,采用隨機(jī)區(qū)組,數(shù)據(jù)如下:

數(shù)據(jù)錄入:

> library(reshape);library(agricolae)

>df<-read.table(file="r3.3.1.2.csv",header=T,sep=",")

> df.2<-melt(df,id=c("A","B"))

> colnames(df.2)[3:4]<-c("Blk","y")

方差分析

> duncan.model<-aov(y~A*B+Blk,data=df.2)

> summary(duncan.model) # show ANOVA table

? ?? ?? ???Df Sum Sq Mean Sq F value? ?Pr(>F)? ???

A? ?? ?? ???3??98.79? ?32.93??15.199 0.000111 ***

B? ?? ?? ???1??77.04? ?77.04??35.558 3.47e-05 ***

Blk? ?? ?? ? 2 20.33? ?10.17? ?4.692 0.027567 *? ?

A:B? ?? ?? ? 3136.46? ?45.49??20.994 1.90e-05 ***

Residuals? ?14??30.33? ?2.17? ?? ?? ?? ?? ?? ???

---

Signif. codes:??0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> anova.tab(duncan.model) #方差格式整理

? ?? ?? ???Df Sum Sq Mean Sq F value? ?Pr(>F)? ???

A? ?? ?? ???3? ?98.8? ?32.93??15.199 0.000111 ***

B? ?? ?? ???1? ?77.0? ?77.04??35.558 3.47e-05 ***

Blk? ?? ?? ? 2??20.3? ?10.17? ?4.692 0.027567 *? ?

A:B? ?? ?? ? 3 136.5? ?45.49??20.994 1.90e-05 ***

Residuals? ?14? ?30.3? ?2.17? ?? ?? ?? ?? ?? ???

Total? ?? ? 23??363.0? ?? ?? ?? ?? ?? ?? ?? ?? ?

---

Signif. codes:??0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

由方差分析表可知A、B、AB互作均達(dá)到極顯著水平,區(qū)組達(dá)到顯著水平,下面進(jìn)行多重比較。

多重比較

> duncan.test(duncan.model,"A",alpha=0.05,console=T) #對(duì)A因素進(jìn)行多重比較

Study: duncan.model ~ "A"

Duncan's new multiple range test

for y

Mean Square Error:??2.166667

A,??means

? ?? ?? ? y? ???std r Min Max

A1 12.00000 1.264911 6??10??13

A2 17.16667 2.926887 6??12??20

A3 13.00000 5.291503 6? ?7??19

A4 12.66667 3.829708 6? ?8??17

alpha: 0.05 ; Df Error: 14

Critical Range

? ?? ? 2? ?? ? 3? ?? ???4

1.822718 1.909920 1.963738

Means with the same letter are notsignificantly different.

Groups, Treatments and means

a A2 17.17

b A3 13

b A4 12.67

b A1 12

由上表可知,A2水平和其他水平相比差異顯著,處理效果最好。

> duncan.test(duncan.model,"B",alpha=0.05,console=T) #對(duì)B因素進(jìn)行多重比較

Study: duncan.model ~ "B"

Duncan's new multiple range test

for y

Mean Square Error:??2.166667

B,??means

? ?? ?? ? y? ???std??r Min Max

B1 15.50000 2.540580 12??12??19

B2 11.91667 4.420167 12? ?7??20

alpha: 0.05 ; Df Error: 14

Critical Range

? ?? ? 2

1.288856

Means with the same letter are notsignificantly different.

Groups, Treatments and means

a B1 15.5

b B2 11.92

由上表可知,B1和B2相比較,差異顯著。

> with(df.2, duncan.test(y, A:B, DFerror = 14, MSerror =2.17,console=T)) #對(duì)AB進(jìn)行多重比較

Study: y ~ A:B

Duncan's new multiple range test

for y

Mean Square Error:??2.17

A:B,??means

? ?? ?? ?? ? y? ?? ? std r Min Max

A1:B1 12.666667 0.5773503 3??12 13

A1:B2 11.333333 1.5275252 3??10 13

A2:B1 15.666667 3.5118846 3??12 19

A2:B2 18.666667 1.5275252 3??17 20

A3:B1 17.666667 1.5275252 3??16 19

A3:B2??8.333333 1.5275252 3? ?7 10

A4:B1 16.000000 1.0000000 3??15 17

A4:B2??9.333333 1.5275252 3? ?8 11

alpha: 0.05 ; Df Error: 14

Critical Range

? ?? ? 2? ?? ? 3? ?? ???4? ?? ???5? ?? ? 6? ?? ???7? ?? ???8

2.579695 2.703112 2.779281 2.8307672.867363 2.894153 2.914097

Means with the same letter are notsignificantly different.

Groups, Treatments and means

a A2:B2 18.67

ab A3:B1 17.67

ab A4:B1 16

b A2:B1 15.67

c A1:B1 12.67

cd A1:B2 11.33

de A4:B2 9.333

e A3:B2 8.333

有互作的多重比較可知,A2:B2互作效果最好,顯著高于A2:B1、A1:B1、A1:B2、A4:B2、A3:B2。

0.0000
1
關(guān)注作者
收藏
評(píng)論(0)

發(fā)表評(píng)論

暫無數(shù)據(jù)
推薦帖子