Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

> a=read.table("D:/robi.

txt",header=T)
>a
Klon Ulangan GB IV BobotBiji
1 KKM22
1 1 23.50
1.26
2 RCC71
1 1 23.00
1.73
3 Hybrid
1 1 23.33
0.68
4 KKM22
2 1 8.25
0.60
5 RCC71
2 1 8.70
1.36
6 Hybrid
2 1 9.25
0.82
7 KKM22
3 1 24.50
1.07
8 RCC71
3 1 24.50
1.01
9 Hybrid
3 1 22.67
0.95
10 KKM22
4 1 23.50
1.28
11 RCC71
4 1 25.00
1.06
12 Hybrid
4 1 22.50
1.33
13 KKM22
5 1 22.50
1.12
14 RCC71
5 1 23.00
0.98
15 Hybrid
5 1 21.50
1.61
16 KKM22
6 1 6.08
1.51
17 RCC71
6 1 4.85
1.23
18 Hybrid
6 1 5.90
1.13
> kruskal.test(GB~Klon,data=a)
Kruskal-Wallis rank sum test
data: GB by Klon
Kruskal-Wallis chi-squared = NaN, df = 2, p-value = NA
> kruskal.test(IV~Klon,data=a)
Kruskal-Wallis rank sum test
data: IV by Klon
Kruskal-Wallis chi-squared = 0.98946, df = 2, p-value = 0.6097
> shapiro.test(a$BobotBiji)
Shapiro-Wilk normality test
data: a$BobotBiji
W = 0.98584, p-value = 0.9903
> bartlett.test(BobotBiji~Klon,data=a)

Bartlett test of homogeneity of variances


data: BobotBiji by Klon
Bartlett's K-squared = 0.16432, df = 2, p-value = 0.9211
> be=aov(BobotBiji~Klon,data=a)
> summary(be)
Df Sum Sq Mean Sq F value Pr(>F)
Klon
2 0.0614 0.03072 0.315 0.735
Residuals 15 1.4646 0.09764
> library(agricolae)
> attach(a)
The following objects are masked from a (pos = 3):
BobotBiji, GB, IV, Klon, Ulangan
> duncan=duncan.test(BobotBiji,Klon,15,0.09764,alpha=0.05)
> duncan
$statistics
Mean
CV MSerror
1.151667 27.13233 0.09764
$parameters
Df ntr alpha test name.t
15 3 0.05 Duncan Klon
$Duncan
Table CriticalRange
2 3.014325 0.3845283
3 3.159826 0.4030895
$means
BobotBiji
std r Min Max
Hybrid 1.086667 0.3435501 6 0.68 1.61
KKM22 1.140000 0.3058758 6 0.60 1.51
RCC71 1.228333 0.2851958 6 0.98 1.73
$comparison
NULL
$groups
trt means M
1 RCC71 1.228333 a
2 KKM22 1.140000 a

3 Hybrid 1.086667 a

You might also like