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

dat<-read.

csv(file = "clipboard", sep = "\t", header=TRUE)


> dat
blk trt rep gs ss
1 1 1 1 0.4000000 0.4000000
2 1 1 2 0.3666667 0.3666667
3 1 1 3 0.3666667 0.3333333
4 1 2 1 0.7666667 0.6500000
5 1 2 2 0.6333333 0.5000000
6 1 2 3 0.9000000 0.9000000
7 1 3 1 0.3000000 0.3500000
8 1 3 2 0.2666667 0.3666667
9 1 3 3 0.2333333 0.4000000
10 1 4 1 1.0000000 1.0000000
11 1 4 2 0.7000000 0.4000000
12 1 4 3 0.7333333 0.5666667
13 1 5 1 0.9666667 0.7000000
14 1 5 2 1.1000000 1.1000000
15 1 5 3 1.3000000 1.3000000
16 1 6 1 1.2000000 1.0000000
17 1 6 2 1.1333333 1.1333333
18 1 6 3 1.1666667 1.2000000
19 2 1 1 0.5333333 0.3666667
20 2 1 2 0.5333333 1.0000000
21 2 1 3 0.5000000 0.7750000
22 2 2 1 0.8000000 0.1500000
23 2 2 2 0.5333333 0.3666667
24 2 2 3 0.8000000 0.6666667
25 2 3 1 0.4000000 0.6000000
26 2 3 2 0.3666667 0.4666667
27 2 3 3 0.3666667 0.3666667
28 2 4 1 0.4000000 0.3000000
29 2 4 2 0.6000000 0.4333333
30 2 4 3 0.7666667 0.6666667
31 2 5 1 1.0333333 0.6750000
32 2 5 2 0.8666667 0.7000000
33 2 5 3 1.4333333 1.2500000
34 2 6 1 0.9333333 0.7000000
35 2 6 2 1.5333333 1.5333333
36 2 6 3 1.6333333 1.3000000
37 3 1 1 0.5000000 0.3000000
38 3 1 2 0.5333333 0.6500000
39 3 1 3 0.4333333 0.9000000
40 3 2 1 0.6000000 1.8666667
41 3 2 2 0.6000000 0.2333333
42 3 2 3 0.6000000 0.3000000
43 3 3 1 0.2333333 0.2500000
44 3 3 2 0.2333333 0.2500000
45 3 3 3 0.1666667 0.7666667
46 3 4 1 0.6000000 0.6666667
47 3 4 2 0.4333333 0.2500000
48 3 4 3 0.7666667 0.5666667
49 3 5 1 0.8333333 0.8333333
50 3 5 2 0.8666667 0.1500000
51 3 5 3 0.8000000 0.4333333
52 3 6 1 1.3666667 0.9000000
53 3 6 2 1.5000000 1.2000000
54 3 6 3 1.0000000 0.5000000
> attach(dat)
> View(out1)
> str(dat)
'data.frame': 54 obs. of 5 variables:
$ blk: int 1 1 1 1 1 1 1 1 1 1 ...
$ trt: int 1 1 1 2 2 2 3 3 3 4 ...
$ rep: int 1 2 3 1 2 3 1 2 3 1 ...
$ gs : num 0.4 0.367 0.367 0.767 0.633 ...
$ ss : num 0.4 0.367 0.333 0.65 0.5 ...
> load("C:/Users/Admin/.RData")
> install.packages("doebioresearch")
WARNING: Rtools is required to build R packages but is not currently installed.
Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Admin/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
the 'wininet' method is deprecated for http:// and https:// URLs
trying URL
'https://cran.rstudio.com/bin/windows/contrib/4.2/doebioresearch_0.1.0.zip'
Content type 'application/zip' length 104065 bytes (101 KB)
downloaded 101 KB

package ‘doebioresearch’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in


C:\Users\Admin\AppData\Local\Temp\RtmpuwG5DN\downloaded_packages
> dat$trt<-as.factor(dat$trt)
> dat$rep<-as.factor(dat$rep)
> dat$blk<-as.factor(dat$blk)
> str(dat)
'data.frame': 54 obs. of 5 variables:
$ blk: Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
$ trt: Factor w/ 6 levels "1","2","3","4",..: 1 1 1 2 2 2 3 3 3 4 ...
$ rep: Factor w/ 3 levels "1","2","3": 1 2 3 1 2 3 1 2 3 1 ...
$ gs : num 0.4 0.367 0.367 0.767 0.633 ...
$ ss : num 0.4 0.367 0.333 0.65 0.5 ...
> library(doebioresearch)
> output<-fcrd2fact(dat, blk, trt, 1)
Warning messages:
1: In anova.lm(model) :
ANOVA F-tests on an essentially perfect fit are unreliable
2: In summary.lm(model) :
essentially perfect fit: summary may be unreliable
3: In anova.lm(model) :
ANOVA F-tests on an essentially perfect fit are unreliable
4: In summary.lm(model) :
essentially perfect fit: summary may be unreliable
> output
$blk
$blk[[1]]
Analysis of Variance Table

Response: dependent.var
Df Sum Sq Mean Sq F value Pr(>F)
fact.A 2 36 18 1.0044e+31 <2e-16 ***
fact.B 5 0 0 4.1700e-02 0.9989
fact.A:fact.B 10 0 0 4.1700e-02 1.0000
Residuals 36 0 0
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

$blk[[2]]
[1] "R Square 1"

$blk[[3]]
[1] "SEm of A: 0 , SEd of A: 0 , SEm of B: 0 , SEd of B: 0 , SEm of AB: 0 , SEd of
AB 0"

$blk[[4]]

Shapiro-Wilk normality test

data: model$residuals
W = 0.27166, p-value = 6.766e-15

$blk[[5]]
[1] "Normality assumption is violated"

$blk[[6]]
[1] "The means of one or more levels of first factor are not same, so go for
multiple comparison test"

$blk[[7]]
$blk[[7]][[1]]
MSerror Df Mean CV t.value LSD
1.792173e-30 36 2 6.693604e-14 2.028094 9.050172e-16

$blk[[7]][[2]]
dependent.var groups
3 3 a
2 2 b
1 1 c

$blk[[8]]
[1] "All the second factor level means are same so dont go for any multiple
comparison test"

$blk[[9]]
$blk[[9]][[1]]
MSerror Df Mean CV t.value LSD
1.792173e-30 36 2 6.693604e-14 2.028094 1.279888e-15

$blk[[9]][[2]]
dependent.var groups
1 2 a
2 2 a
3 2 a
4 2 a
5 2 a
6 2 a

$blk[[10]]
[1] "The means of levels of interaction between two factors are same so dont go for
any multiple comparison test"
$blk[[11]]
$blk[[11]][[1]]
MSerror Df Mean CV t.value LSD
1.792173e-30 36 2 6.693604e-14 2.028094 2.21683e-15

$blk[[11]][[2]]
dependent.var groups
3:1 3 a
3:2 3 a
3:3 3 a
3:4 3 a
3:5 3 a
3:6 3 a
2:1 2 b
2:2 2 b
2:3 2 b
2:4 2 b
2:5 2 b
2:6 2 b
1:1 1 c
1:2 1 c
1:3 1 c
1:4 1 c
1:5 1 c
1:6 1 c

$trt
$trt[[1]]
Analysis of Variance Table

Response: dependent.var
Df Sum Sq Mean Sq F value Pr(>F)
fact.A 2 0.0 0.0 3.770e-01 0.6886
fact.B 5 157.5 31.5 9.264e+30 <2e-16 ***
fact.A:fact.B 10 0.0 0.0 8.564e-01 0.5801
Residuals 36 0.0 0.0
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

$trt[[2]]
[1] "R Square 1"

$trt[[3]]
[1] "SEm of A: 0 , SEd of A: 0 , SEm of B: 0 , SEd of B: 0 , SEm of AB: 0 , SEd of
AB 0"

$trt[[4]]

Shapiro-Wilk normality test

data: model$residuals
W = 0.50402, p-value = 3.044e-12

$trt[[5]]
[1] "Normality assumption is violated"
$trt[[6]]
[1] "All the first factor level means are same so dont go for any multiple
comparison test"

$trt[[7]]
$trt[[7]][[1]]
MSerror Df Mean CV t.value LSD
3.400273e-30 36 3.5 5.268523e-14 2.028094 1.24659e-15

$trt[[7]][[2]]
dependent.var groups
1 3.5 a
2 3.5 a
3 3.5 a

$trt[[8]]
[1] "The means of one or more levels of second factor are not same, so go for
multiple comparison test"

$trt[[9]]
$trt[[9]][[1]]
MSerror Df Mean CV t.value LSD
3.400273e-30 36 3.5 5.268523e-14 2.028094 1.762945e-15

$trt[[9]][[2]]
dependent.var groups
6 6 a
5 5 b
4 4 c
3 3 d
2 2 e
1 1 f

$trt[[10]]
[1] "The means of levels of interaction between two factors are same so dont go for
any multiple comparison test"

$trt[[11]]
$trt[[11]][[1]]
MSerror Df Mean CV t.value LSD
3.400273e-30 36 3.5 5.268523e-14 2.028094 3.05351e-15

$trt[[11]][[2]]
dependent.var groups
1:6 6 a
2:6 6 a
3:6 6 a
1:5 5 b
2:5 5 b
3:5 5 b
1:4 4 c
2:4 4 c
3:4 4 c
1:3 3 d
2:3 3 d
3:3 3 d
1:2 2 e
2:2 2 e
3:2 2 e
1:1 1 f
2:1 1 f
3:1 1 f

$rep
$rep[[1]]
Analysis of Variance Table

Response: dependent.var
Df Sum Sq Mean Sq F value Pr(>F)
fact.A 2 0 0 0 1
fact.B 5 0 0 0 1
fact.A:fact.B 10 0 0 0 1
Residuals 36 36 1

$rep[[2]]
[1] "R Square 0"

$rep[[3]]
[1] "SEm of A: 0.236 , SEd of A: 0.333 , SEm of B: 0.333 , SEd of B: 0.471 , SEm of
AB: 0.577 , SEd of AB 0.816"

$rep[[4]]

Shapiro-Wilk normality test

data: model$residuals
W = 0.79339, p-value = 2.844e-07

$rep[[5]]
[1] "Normality assumption is violated"

$rep[[6]]
[1] "All the first factor level means are same so dont go for any multiple
comparison test"

$rep[[7]]
$rep[[7]][[1]]
MSerror Df Mean CV t.value LSD
1 36 2 50 2.028094 0.6760313

$rep[[7]][[2]]
dependent.var groups
1 2 a
2 2 a
3 2 a

$rep[[8]]
[1] "All the second factor level means are same so dont go for any multiple
comparison test"

$rep[[9]]
$rep[[9]][[1]]
MSerror Df Mean CV t.value LSD
1 36 2 50 2.028094 0.9560527

$rep[[9]][[2]]
dependent.var groups
1 2 a
2 2 a
3 2 a
4 2 a
5 2 a
6 2 a

$rep[[10]]
[1] "The means of levels of interaction between two factors are same so dont go for
any multiple comparison test"

$rep[[11]]
$rep[[11]][[1]]
MSerror Df Mean CV t.value LSD
1 36 2 50 2.028094 1.655932

$rep[[11]][[2]]
dependent.var groups
1:1 2 a
1:2 2 a
1:3 2 a
1:4 2 a
1:5 2 a
1:6 2 a
2:1 2 a
2:2 2 a
2:3 2 a
2:4 2 a
2:5 2 a
2:6 2 a
3:1 2 a
3:2 2 a
3:3 2 a
3:4 2 a
3:5 2 a
3:6 2 a

$gs
$gs[[1]]
Analysis of Variance Table

Response: dependent.var
Df Sum Sq Mean Sq F value Pr(>F)
fact.A 2 0.1161 0.05805 2.2622 0.1187
fact.B 5 5.9031 1.18061 46.0127 1.195e-14 ***
fact.A:fact.B 10 0.3205 0.03205 1.2489 0.2950
Residuals 36 0.9237 0.02566
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

$gs[[2]]
[1] "R Square 0.873"

$gs[[3]]
[1] "SEm of A: 0.038 , SEd of A: 0.053 , SEm of B: 0.053 , SEd of B: 0.076 , SEm of
AB: 0.092 , SEd of AB 0.131"

$gs[[4]]

Shapiro-Wilk normality test

data: model$residuals
W = 0.93798, p-value = 0.007688

$gs[[5]]
[1] "Normality assumption is violated"

$gs[[6]]
[1] "All the first factor level means are same so dont go for any multiple
comparison test"

$gs[[7]]
$gs[[7]][[1]]
MSerror Df Mean CV t.value LSD
0.02565844 36 0.7339506 21.8247 2.028094 0.1082884

$gs[[7]][[2]]
dependent.var groups
2 0.7796296 a
1 0.7518519 ab
3 0.6703704 b

$gs[[8]]
[1] "The means of one or more levels of second factor are not same, so go for
multiple comparison test"

$gs[[9]]
$gs[[9]][[1]]
MSerror Df Mean CV t.value LSD
0.02565844 36 0.7339506 21.8247 2.028094 0.1531429

$gs[[9]][[2]]
dependent.var groups
6 1.2740741 a
5 1.0222222 b
2 0.6925926 c
4 0.6666667 c
1 0.4629630 d
3 0.2851852 e

$gs[[10]]
[1] "The means of levels of interaction between two factors are same so dont go for
any multiple comparison test"

$gs[[11]]
$gs[[11]][[1]]
MSerror Df Mean CV t.value LSD
0.02565844 36 0.7339506 21.8247 2.028094 0.2652513

$gs[[11]][[2]]
dependent.var groups
2:6 1.3666667 a
3:6 1.2888889 a
1:6 1.1666667 a
1:5 1.1222222 a
2:5 1.1111111 a
3:5 0.8333333 b
1:4 0.8111111 b
1:2 0.7666667 bc
2:2 0.7111111 bcd
3:2 0.6000000 bcde
3:4 0.6000000 bcde
2:4 0.5888889 bcde
2:1 0.5222222 cdef
3:1 0.4888889 def
1:1 0.3777778 efg
2:3 0.3777778 efg
1:3 0.2666667 fg
3:3 0.2111111 g

$ss
$ss[[1]]
Analysis of Variance Table

Response: dependent.var
Df Sum Sq Mean Sq F value Pr(>F)
fact.A 2 0.0840 0.04199 0.3644 0.697121
fact.B 5 2.2633 0.45267 3.9287 0.006049 **
fact.A:fact.B 10 1.1123 0.11123 0.9654 0.489049
Residuals 36 4.1480 0.11522
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

$ss[[2]]
[1] "R Square 0.455"

$ss[[3]]
[1] "SEm of A: 0.08 , SEd of A: 0.113 , SEm of B: 0.113 , SEd of B: 0.16 , SEm of
AB: 0.196 , SEd of AB 0.277"

$ss[[4]]

Shapiro-Wilk normality test

data: model$residuals
W = 0.94595, p-value = 0.01663

$ss[[5]]
[1] "Normality assumption is violated"

$ss[[6]]
[1] "All the first factor level means are same so dont go for any multiple
comparison test"
$ss[[7]]
$ss[[7]][[1]]
MSerror Df Mean CV t.value LSD
0.1152212 36 0.6666667 50.91637 2.028094 0.2294737

$ss[[7]][[2]]
dependent.var groups
1 0.7037037 a
2 0.6842593 a
3 0.6120370 a

$ss[[8]]
[1] "The means of one or more levels of second factor are not same, so go for
multiple comparison test"

$ss[[9]]
$ss[[9]][[1]]
MSerror Df Mean CV t.value LSD
0.1152212 36 0.6666667 50.91637 2.028094 0.3245249

$ss[[9]][[2]]
dependent.var groups
6 1.0518519 a
5 0.7935185 ab
2 0.6259259 bc
1 0.5657407 bc
4 0.5388889 bc
3 0.4240741 c

$ss[[10]]
[1] "The means of levels of interaction between two factors are same so dont go for
any multiple comparison test"

$ss[[11]]
$ss[[11]][[1]]
MSerror Df Mean CV t.value LSD
0.1152212 36 0.6666667 50.91637 2.028094 0.5620936

$ss[[11]][[2]]
dependent.var groups
2:6 1.1777778 a
1:6 1.1111111 a
1:5 1.0333333 ab
2:5 0.8750000 abc
3:6 0.8666667 abc
3:2 0.8000000 abc
2:1 0.7138889 abc
1:2 0.6833333 abc
1:4 0.6555556 abc
3:1 0.6166667 abc
3:4 0.4944444 bc
2:3 0.4777778 bc
3:5 0.4722222 bc
2:4 0.4666667 c
3:3 0.4222222 c
2:2 0.3944444 c
1:3 0.3722222 c
1:1 0.3666667 c

You might also like