RCBD

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

CRBD

Question
Example

A field trial to find out the best level of fertilizer on capsicum Suppose the experimental field is a slop land and
consequently identify there is a gradient of soil variability along the slope.

Excell

Trt Block
1
1
1
1
2
2
2
2
3
3
3
3
4
4
4
4
5
5
5
5
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)

trt=c("T1","T2","T3","T4","T5")

r=4

design.rcbd(trt, r, serie = 2, seed = 0, kinds = "Super-Duper", first=TRUE,


continue=FALSE,randomization=TRUE )

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

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

rcbd.aov=aov(height~Trt+Block,data)
summary(rcbd.aov)

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

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

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

Rstudio result

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

$parameters$trt
[1] "T1" "T2" "T3" "T4" "T5"
$parameters$r
[1] 4

$parameters$serie
[1] 2

$parameters$seed
[1] 455604755

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

$parameters[[7]]
[1] TRUE

$sketch
[,1] [,2] [,3] [,4] [,5]
[1,] "T3" "T2" "T1" "T5" "T4"
[2,] "T5" "T1" "T3" "T2" "T4"
[3,] "T2" "T4" "T3" "T5" "T1"
[4,] "T5" "T1" "T2" "T4" "T3"
$book
plots block trt
1 101 1 T3
2 102 1 T2
3 103 1 T1
4 104 1 T5
5 105 1 T4
6 201 2 T5
7 202 2 T1
8 203 2 T3
9 204 2 T2
10 205 2 T4
11 301 3 T2
12 302 3 T4
13 303 3 T3
14 304 3 T5
15 305 3 T1
16 401 4 T5
17 402 4 T1
18 403 4 T2
19 404 4 T4
20 405 4 T3
> data = read.table("clipboard",header=1)
> data$Trt=as.factor(data$Trt)
> rcbd.aov=aov(height~Trt+Block,data)
> summary(rcbd.aov)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 4 212.25 53.06 50.107 3.81e-08 ***
Block 1 6.92 6.92 6.532 0.0229 *
Residuals 14 14.83 1.06
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> par(mfrow=c(2,2))
> plot(rcbd.aov)
> lsd.test= LSD.test(rcbd.aov,"Trt")
> lsd.test
$statistics
MSerror Df Mean CV t.value LSD
1.058971 14 37.705 2.729249 2.144787 1.560671

$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.5145317 30.42144 32.62856 29.2 33.4 30.775 31.75 32.500
2 37.375 1.2284814 4 0.5145317 36.27144 38.47856 35.8 38.8 37.000 37.45 37.825
3 39.550 0.9746794 4 0.5145317 38.44644 40.65356 38.6 40.9 39.050 39.35 39.850
4 40.525 0.9945686 4 0.5145317 39.42144 41.62856 39.4 41.7 39.925 40.50 41.100
5 39.550 0.8103497 4 0.5145317 38.44644 40.65356 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"
> boxplot(data$height~data$Trt,main=("Comparative Box Plot"),xlab = "Treatment",ylab="Heig
>

>

Interpretation

Assumption
Data from population are normally distributed
Population has equal variance
Samples are randomly and independently drowned
𝜖𝑖𝑗~𝑖𝑖𝑑𝑛 0, 𝜎𝜖 2

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(rcbd.aov)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 4 212.25 53.06 50.107 3.81e-08 ***
Block 1 6.92 6.92 6.532 0.0229 *
Residuals 14 14.83 1.06
---
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
4 2 4 2

Residuals

0
-2

-2
3 3

32 36 40 -2 -1 0 1 2

Fitted values Theoretical Quantiles


Standardized residuals

Standardized residuals
Scale-Location Residuals vs Leverage
3 0.5

2
4 2 2 4
1.0

0
-2
Cook's3distance
0.0

0.5

32 36 40 0.00 0.15 0.30

Fitted values Leverage

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
$statistics
MSerror Df Mean CV t.value LSD
1.058971 14 37.705 2.729249 2.144787 1.560671

$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.5145317 30.42144 32.62856 29.2 33.4 30.775 31.75 32.500
2 37.375 1.2284814 4 0.5145317 36.27144 38.47856 35.8 38.8 37.000 37.45 37.825
3 39.550 0.9746794 4 0.5145317 38.44644 40.65356 38.6 40.9 39.050 39.35 39.850
4 40.525 0.9945686 4 0.5145317 39.42144 41.62856 39.4 41.7 39.925 40.50 41.100
5 39.550 0.8103497 4 0.5145317 38.44644 40.65356 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
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
Comparative Box Plot
heights in 5 treatments.
The boxplot for each treatment’s heights indicates that treatment 4
42

getting the highest height while treatment 2 getting the lowest and there
Height

36

is a huge variation in the temperatures all area. The mean temperature of


Area 4 and 5 are closely same.
30

1 2 3 4 5

Treatment

You might also like