You are on page 1of 6

CRD

Question
Example: Testing the impact of a growth hormone

An experiment is planned to find the impact of a growth regulator on plant growth. Five rates of it is applied to five
plants which is replicated four times. Plant height is measured as the growth parameter of the plant. The
experiment is planned to be done in a plant house where the environment can be controlled.

Excell

Trt Rep height


1 1 31.3
1 2 33.4
1 3 29.2
1 4 32.2
2 1 38.8
2 2 37.5
2 3 37.4
2 4 35.8
3 1 40.9
3 2 39.2
3 3 39.5
3 4 38.6
4 1 40.9
4 2 41.7
4 3 39.4
4 4 40.1
5 1 39.7
5 2 40.6
5 3 39.2
5 4 38.7
R studio
install.packages("agricolae")
library(agricolae)
install.packages("dae")
library(dae)
install.packages("gglpot2")
library(ggplot2)
install.packages("car")
library(car)
install.packages("ExpDes")
library(ExpDes)
install.packages("rsm")
library(rsm)

data=read.table("clipboard",header = 1)

trt=c("T1","T2","T3","T4","T5")
design.crd(trt, r=4, serie = 2, seed = 0, kinds = "Super-Duper",randomization=TRUE)

data$Trt=as.factor(data$Trt)

crd.aov=aov(height~Trt,data)
summary(crd.aov)

par(mfrow=c(2,2))
plot(crd.aov)

lsd.test=LSD.test(crd.aov,"Trt")
lsd.aov

boxplot(data$height~data$Trt,main=("Comparative Box Plot"), xlab = "Treatment", ylab = "Height", col=("pink"))

Rstudio result

> data = read.table ("clipboard",header=1)


> trt=c("T1","T2","T3","T4","T5")
> design.crd(trt, r=4, serie = 2, seed = 0, kinds = "Super-Duper",randomization=TRUE)
$parameters
$parameters$design
[1] "crd"
$parameters$trt
[1] "T1" "T2" "T3" "T4" "T5"
$parameters$r
[1] 4 4 4 4 4

$parameters$serie
[1] 2
$parameters$seed
[1] 1278223951

$parameters$kinds
[1] "Super-Duper"

$parameters[[7]]
[1] TRUE

$book
plots r trt
1 101 1 T4
2 102 1 T3
3 103 1 T1
4 104 1 T2
5 105 1 T5
6 106 2 T2
7 107 2 T3
8 108 2 T5
9 109 2 T4
10 110 2 T1
11 111 3 T4
12 112 3 T3
13 113 3 T2
14 114 4 T4
15 115 3 T1
16 116 4 T1
17 117 3 T5
18 118 4 T2
19 119 4 T5
20 120 4 T3

> data$Trt=as.factor(data$Trt)
> crd.aov=aov(height~Trt,data)
> summary(crd.aov)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 4 212.25 53.06 36.61 1.42e-07 ***
Residuals 15 21.74 1.45
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> par(mfrow=c(2,2))
> plot(crd.aov)
> lsd.test=LSD.test(crd.aov,"Trt")
> lsd.aov
Call:
aov(formula = Yield ~ row + col + trt, data = Book)
Terms:
row col trt Residuals
Sum of Squares 150 68 202 256
Deg. of Freedom 4 4 4 12

Residual standard error: 4.618802


Estimated effects may be unbalanced
> boxplot(data$height~data$Trt,main=("Comparative Box Plot"), xlab = "Treatment", yla
b = "Height", col=("pink"))
>

Interpretation

Assumption
Data from population are normally distributed
Population has equal variance
Samples are randomly and independently drowned
𝜖𝑖𝑗~𝑖𝑖𝑑𝑛 0, 𝜎𝜖 2
Y is a random variable while treatments (𝜏𝑖 ) are considered as fixed.
Then, 𝑦𝑖𝑗~𝑖𝑖𝑑𝑛 𝜇 + 𝜏𝑖 , 𝜎𝜖

Hypothesis
Null hypothesis: Mean heights are same for all the treatments
Alternative hypothesis: At least one of the height is different out of the five treatments

Rejection Criteria
At 95% confidence level,
P value obtain is less than 0.05 reject the null hypothesis

Results

> summary(crd.aov)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 4 212.25 53.06 36.61 1.42e-07 ***
Residuals 15 21.74 1.45
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Here P value is less than 0.05 (P < 0.05)


ANOVA is significant
at 95% confidence level reject the Null Hypothesis

Conclusion
At 95% confidence Level, at least height of two treatments are statistically significantly Different.

Residual Analysis
Standardized residuals

Residuals vs Fitted Q-Q Residuals


2
2

2 2
Residuals

0
-2

8 8
-2

3 3

32 36 40 -2 -1 0 1 2

Fitted values Theoretical Quantiles

Constant Leverage:
Standardized residuals

Standardized residuals

Scale-Location Residuals vs Factor Levels


2

3
2 2
8
1.0

0
-2

8
0.0

3
Trt :
32 36 40 1 2 3 4 5

Fitted values Factor Level Combinations


Here,
Residuals vs Fitted plot does not show funnel shape distribution of data points.
Q-Q Residuals plot gets linear shape. It does not show s shape.
So, the assumptions are not violated.

LSD test

>

> lsd.test=LSD.test(crd.aov,"Trt")
> lsd.test
$statistics
MSerror Df Mean CV t.value LSD
1.4495 15 37.705 3.193083 2.13145 1.814551

$parameters
test p.ajusted name.t ntr alpha
Fisher-LSD none Trt 5 0.05

$means
height std r se LCL UCL Min Max Q25 Q50 Q75
1 31.525 1.7727098 4 0.6019759 30.24192 32.80808 29.2 33.4 30.775 31.75 32.500
2 37.375 1.2284814 4 0.6019759 36.09192 38.65808 35.8 38.8 37.000 37.45 37.825
3 39.550 0.9746794 4 0.6019759 38.26692 40.83308 38.6 40.9 39.050 39.35 39.850
4 40.525 0.9945686 4 0.6019759 39.24192 41.80808 39.4 41.7 39.925 40.50 41.100
5 39.550 0.8103497 4 0.6019759 38.26692 40.83308 38.7 40.6 39.075 39.45 39.925

$comparison
NULL

$groups
height groups
4 40.525 a
5 39.550 a
3 39.550 a
2 37.375 b
1 31.525 c

attr(,"class")
[1] "group"

Means are ordered from highest to lowest. The mean temperature of area 4 and 1 pair has no different, while
other pairs are different.
Boxplot
This boxplot also helped to identify the difference of the means
of the heights in 5 treatments.
Comparative Box Plot
The boxplot for each treatment’s heights indicates that
36 42
treatment 4 getting the highest height while treatment 2
Temparature

getting the lowest and there is a huge variation in the


Height

27.8

temperatures all area. The mean temperature of Area 4 and 5


are closely same.
27.4
30

11 22 3 3 4 45

Treatment
Area

You might also like