Pin Elevation - Position 1 (-1), Position 3 (+1);
Bungee Position - Position 2 (-1), Position 3 (+1);
Release Angle - \(90^{0} (-1),\space 110^{0} (+1)\);
Ball Type - Yellow (-1), Red (+1).
library(agricolae)
trts<-c(2,2,2,2)
design.ab(trt=trts,r=1,design="crd",seed=25586)
## $parameters
## $parameters$design
## [1] "factorial"
##
## $parameters$trt
## [1] "1 1 1 1" "1 1 1 2" "1 1 2 1" "1 1 2 2" "1 2 1 1" "1 2 1 2" "1 2 2 1"
## [8] "1 2 2 2" "2 1 1 1" "2 1 1 2" "2 1 2 1" "2 1 2 2" "2 2 1 1" "2 2 1 2"
## [15] "2 2 2 1" "2 2 2 2"
##
## $parameters$r
## [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
##
## $parameters$serie
## [1] 2
##
## $parameters$seed
## [1] 25586
##
## $parameters$kinds
## [1] "Super-Duper"
##
## $parameters[[7]]
## [1] TRUE
##
## $parameters$applied
## [1] "crd"
##
##
## $book
## plots r A B C D
## 1 101 1 1 2 1 2
## 2 102 1 2 1 2 2
## 3 103 1 2 2 2 2
## 4 104 1 2 2 1 1
## 5 105 1 2 1 1 2
## 6 106 1 2 1 2 1
## 7 107 1 1 1 1 1
## 8 108 1 1 1 2 2
## 9 109 1 1 1 1 2
## 10 110 1 1 2 2 1
## 11 111 1 1 2 1 1
## 12 112 1 2 2 2 1
## 13 113 1 2 1 1 1
## 14 114 1 2 2 1 2
## 15 115 1 1 2 2 2
## 16 116 1 1 1 2 1
A: Ball Type - Yellow (-1), Red (1)
B: Release Angle - \(90^{0} (-1), 110^{0} (+1)\)
C: Bungee Position - Position 2 (-1), Position 3 (+1)
D: Pin Elevation - Position 1 (-1), Position 3 (+1)
library("readxl")
Fdata3<-read_excel("C:/Users/Saipa/OneDrive/Desktop/DOE/Projectdata3.xlsx")
print(Fdata3)
## # A tibble: 16 x 5
## `Ball Type` `Release Angle` `Bungee Position` `Pin Elevation` Obs
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 -1 1 -1 1 28
## 2 1 -1 1 1 23
## 3 1 1 1 1 19
## 4 1 1 -1 -1 54
## 5 1 -1 -1 1 27
## 6 1 -1 1 -1 54
## 7 -1 -1 -1 -1 37
## 8 -1 -1 1 1 28
## 9 -1 -1 -1 1 33
## 10 -1 1 1 -1 52
## 11 -1 1 -1 -1 56
## 12 1 1 1 -1 42
## 13 1 -1 -1 -1 40
## 14 1 1 -1 1 20
## 15 -1 1 1 1 15
## 16 -1 -1 1 -1 43
#colnames(Fdata3)<-c("A","B","C","D","Obs")
#print(Fdata3)
A<-Fdata3$`Ball Type`
B<-Fdata3$`Release Angle`
C<-Fdata3$`Bungee Position`
D<-Fdata3$`Pin Elevation`
Obs<-Fdata3$Obs
\(y_{ijklm}= \mu + \alpha_i + \beta_j + \gamma_k + \delta_l + \alpha\beta_{ij} + \alpha\gamma_{ik} + \alpha\delta_{il} + \beta\gamma_{jk} + \beta\delta_{jl} + \gamma\delta_{kl} + \alpha\beta\gamma_{ijk} + \alpha\beta\delta_{ijl} + \beta\gamma\delta_{jkl} + \alpha\beta\gamma\delta_{ijkl} + \epsilon_{ijklm}\)
where; \(\mu\): Grand mean
\(\alpha_i, \beta_j, \gamma_k, \delta_l\): Main effects of factors A, B, C and D respectively
\(\alpha\beta_{ij}, \alpha\gamma_{ik}, \alpha\delta_{il}, \beta\gamma_{jk}, \beta\delta_{jl}, \gamma\delta_{kl}, \alpha\beta\gamma_{ijk}, \alpha\beta\delta_{ijl}, \beta\gamma\delta_{jkl}, \alpha\beta\gamma\delta_{ijkl}\): This are the two factor, three factor and four factor interactions.
\(\epsilon_{ijklm}\): Random error which is distributed normal (0,1).
library(DoE.base)
fmodel<-aov(Obs~A*B*C*D)
coef(fmodel)
## (Intercept) A B C D A:B
## 35.6875 -0.8125 0.0625 -1.1875 -11.5625 -1.1875
## A:C B:C A:D B:D C:D A:B:C
## 0.8125 -2.5625 -1.0625 -3.6875 -1.6875 -0.3125
## A:B:D A:C:D B:C:D A:B:C:D
## 2.0625 0.8125 1.9375 1.6875
summary(fmodel)
## Df Sum Sq Mean Sq
## A 1 10.6 10.6
## B 1 0.1 0.1
## C 1 22.6 22.6
## D 1 2139.1 2139.1
## A:B 1 22.6 22.6
## A:C 1 10.6 10.6
## B:C 1 105.1 105.1
## A:D 1 18.1 18.1
## B:D 1 217.6 217.6
## C:D 1 45.6 45.6
## A:B:C 1 1.6 1.6
## A:B:D 1 68.1 68.1
## A:C:D 1 10.6 10.6
## B:C:D 1 60.1 60.1
## A:B:C:D 1 45.6 45.6
halfnormal(fmodel)
\(\underline{Comments}\):From the half normal plot ,we got only Pin Elevation(D) as the significant factor. This factor are used for the further analysis and rest of the factors are considered as error factors.
fmodel2<-aov(Obs~D)
summary(fmodel2)
## Df Sum Sq Mean Sq F value Pr(>F)
## D 1 2139.1 2139.1 46.91 7.94e-06 ***
## Residuals 14 638.4 45.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
\(\underline{Comments}\): After removing all insignificant terms from the model and we can say that main effect D is only significantly differing at \(\alpha = 0.05\) as we got \(P-value = 7.94e^{-06}\) .
\(\underline{Conclusion}\): The analysis gave us that, The distance to which the particular type of ball is thrown is depending only on Pin Elevation only. Remaining all the factors are just considered as error factors i.e they are not effecting the distance thrown(insignificant terms or factors).
# Layout generation
library(agricolae)
trts<-c(2,2,2,2)
design.ab(trt=trts,r=1,design="crd",seed=25586)
# Data Entry
library("readxl")
Fdata3<-read_excel("C:/Users/Saipa/OneDrive/Desktop/DOE/Projectdata3.xlsx")
print(Fdata3)
#colnames(Fdata3)<-c("A","B","C","D","Obs")
#print(Fdata3)
A<-Fdata3$`Ball Type`
B<-Fdata3$`Release Angle`
C<-Fdata3$`Bungee Position`
D<-Fdata3$`Pin Elevation`
Obs<-Fdata3$Obs
# Checking For Significant Factors
library(DoE.base)
fmodel<-aov(Obs~A*B*C*D)
coef(fmodel)
summary(fmodel)
halfnormal(fmodel)
# Final Model
fmodel2<-aov(Obs~D)
summary(fmodel2)