library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.1 (2020-08-26 16:20:06 UTC) successfully loaded. See ?R.methodsS3 for help.
obs<-c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
bolt<-c(rep(seq(1,5),4))
chemical<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolt<-as.fixed(bolt)
chemical<-as.fixed(chemical)
model<-lm(obs~chemical+bolt)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 2.3761 0.1211
## bolt 4 157.00 39.250 21.6055 2.059e-05 ***
## Residual 12 21.80 1.817
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
As p value=0.1211 which is lesser than α= 0.15, we conclude that we reject the null hypothesis
Without blocking the Linear effect equation is
boltt<-as.random(bolt)
boltt<-as.fixed(boltt)
model<-lm(obs~chemical)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.3167 0.3863 0.7644
## Residual 16 178.80 11.1750
As p value=0.7644 which is lesser than α= 0.15, we conclude that we fail to reject the null hypothesis
From the results of Q.1 and Q.2 we can conclude that, Blocking allows us to account for sources of nuisance variability that are known as controllable.
DOF in CRD error is larger than RCBD
Hence, we do believe that the Bolt of cloth represents a significant amount of nuisance variability