Question 7.12

Consider the potting experiment in Problem 6.21 Analyze the data considering each replicate as a block.

#Null Hypothesis(H0): (alpha)_i = 0 for all i

#Alternate Hypothesis(Ha): (alpha)_i != 0 for some i

#Null Hypothesis(H0): (beta)_j = 0 for all j

#Alternate Hypothesis(Ha): (beta)_j != 0 for some j

#Null Hypothesis(H0): (gamma)_k = 0 for all k

#Alternate Hypothesis(Ha): (gamma)_k != 0 for some k

#Null Hypothesis(H0): (delta)_l = 0 for all l

#Alternate Hypothesis(Ha): (delta)_l != 0 for some l

library(DoE.base)
## Warning: package 'DoE.base' was built under R version 4.2.2
## Loading required package: grid
## Loading required package: conf.design
## Registered S3 method overwritten by 'DoE.base':
##   method           from       
##   factorize.factor conf.design
## 
## Attaching package: 'DoE.base'
## The following objects are masked from 'package:stats':
## 
##     aov, lm
## The following object is masked from 'package:graphics':
## 
##     plot.design
## The following object is masked from 'package:base':
## 
##     lengths
Length <- rep(c(-1,1,-1,1),28)
Type <- rep(c(-1,-1,1,1),28)
Break<- rep(c(-1,-1,-1,-1,1,1,1,1),14)
slope <- rep(c(rep(-1,8),rep(1,8)),7)

Block <- Length*Break*Type*slope

Observation <- c(10.0,0.0,4.0,0.0,0.0,5.0,6.5,16.5,4.5,19.5,15.0,41.5,8.0,21.5,0.0,18.0,         
              18.0,16.5,6.0,10.0,0.0,20.5,18.5,4.5,18.0,18.0,16.0,39.0,4.5,10.5,0.0,5.0,     
              14.0,4.5,1.0,34.0,18.5,18.0,7.5,0.0,14.5,16.0,8.5,6.5,6.5,6.5,0.0,7.0,             
              12.5,17.5,14.5,11.0,19.5,20.0,6.0,23.5,10.0,5.5,0.0,3.5,10.0,0.0,4.5,10.0,       
              19.0,20.5,12.0,25.5,16.0,29.5,0.0,8.0,0.0,10.0,0.5,7.0,13.0,15.5,1.0,32.5,     
              16.0,17.5,14.0,21.5,15.0,19.0,10.0,8.0,17.5,7.0,9.0,8.5,41.0,24.0,4.0,18.5,       
              18.5,33.0,5.0,0.0,11.0,10.0,0.0,8.0,6.0,36.0,3.0,36.0,14.0,16.0,6.5,8.0)       
Test <- aov(Observation~Block+Length*Break*Type*slope)
summary(Test)
##                    Df Sum Sq Mean Sq F value  Pr(>F)   
## Block               1     96    95.6   1.104 0.29599   
## Length              1    917   917.1  10.588 0.00157 **
## Break               1    145   145.1   1.676 0.19862   
## Type                1    388   388.1   4.481 0.03686 * 
## slope               1      1     1.4   0.016 0.89928   
## Length:Break        1     12    11.9   0.137 0.71178   
## Length:Type         1    219   218.7   2.525 0.11538   
## Break:Type          1    115   115.0   1.328 0.25205   
## Length:slope        1     94    93.8   1.083 0.30066   
## Break:slope         1      2     1.6   0.019 0.89127   
## Type:slope          1     56    56.4   0.651 0.42159   
## Length:Break:Type   1      7     7.3   0.084 0.77294   
## Length:Break:slope  1     39    39.5   0.456 0.50121   
## Length:Type:slope   1    113   113.0   1.305 0.25623   
## Break:Type:slope    1     34    33.8   0.390 0.53386   
## Residuals          96   8316    86.6                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Analyzing the data we can see that the length of the put(0.00157) and type of put(0.03686) are not significant and the p value is more than level of signifance we reject the null hypothesis

we are testing with blocking

Test1<-aov(Observation~Length+Type+Break+slope+Block)
summary(Test1)
##              Df Sum Sq Mean Sq F value  Pr(>F)   
## Length        1    917   917.1  10.794 0.00138 **
## Type          1    388   388.1   4.568 0.03487 * 
## Break         1    145   145.1   1.708 0.19405   
## slope         1      1     1.4   0.016 0.89828   
## Block         1     96    95.6   1.126 0.29112   
## Residuals   106   9007    85.0                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

we can see that after blocking the factors length of the put (0.00138) and Type of the put (0.03487) are significant