Perform a designed experiment to determine the effect of the available factors of Fire Angle, Bungee Position, Release Angle, Pin Elevation, and Cup Elevation on distance in which a ball is thrown. Design this experiment as a single replicate of a 2^5 factorial design with the low and high level of the factors being as follows

image:

Part A

Propose a data collection layout with a randomized run order

trts <- c(2,2,2,2,2)
reps <- 1
seedNum <- 1234567
experiment <- design.ab(trt = trts, r=reps,design="crd",seed = seedNum)
experiment$book
##    plots r A B C D E
## 1    101 1 1 1 2 1 1
## 2    102 1 1 2 1 1 1
## 3    103 1 2 2 1 1 1
## 4    104 1 2 1 2 2 1
## 5    105 1 2 2 2 1 2
## 6    106 1 2 2 1 1 2
## 7    107 1 2 1 1 1 1
## 8    108 1 1 2 2 2 1
## 9    109 1 1 2 1 1 2
## 10   110 1 1 1 2 1 2
## 11   111 1 1 1 1 1 1
## 12   112 1 2 1 1 1 2
## 13   113 1 2 2 2 2 2
## 14   114 1 2 1 1 2 2
## 15   115 1 1 1 1 2 2
## 16   116 1 2 1 2 2 2
## 17   117 1 2 1 2 1 1
## 18   118 1 1 2 1 2 1
## 19   119 1 1 1 1 1 2
## 20   120 1 2 1 1 2 1
## 21   121 1 2 2 2 2 1
## 22   122 1 2 2 1 2 1
## 23   123 1 2 2 1 2 2
## 24   124 1 1 1 2 2 1
## 25   125 1 1 2 1 2 2
## 26   126 1 1 2 2 1 1
## 27   127 1 1 1 1 2 1
## 28   128 1 2 1 2 1 2
## 29   129 1 1 1 2 2 2
## 30   130 1 2 2 2 1 1
## 31   131 1 1 2 2 1 2
## 32   132 1 1 2 2 2 2

Part B

Collect the data and record observations

p3data
##    ï..Fire_Ang Bungee Release Pin_El Cup_El distance
## 1           -1     -1       1     -1     -1    123.0
## 2           -1      1      -1     -1     -1    101.0
## 3            1      1      -1     -1     -1    112.0
## 4            1     -1       1      1     -1    232.0
## 5            1      1       1     -1      1    261.0
## 6            1      1      -1     -1      1    148.5
## 7            1     -1      -1     -1     -1    100.0
## 8           -1      1       1      1     -1    151.0
## 9           -1      1      -1     -1      1    126.5
## 10          -1     -1       1     -1      1    155.0
## 11          -1     -1      -1     -1     -1     96.0
## 12           1     -1      -1     -1      1    138.0
## 13           1      1       1      1      1    342.0
## 14           1     -1      -1      1      1    173.5
## 15          -1     -1      -1      1      1    140.5
## 16           1     -1       1      1      1    310.0
## 17           1     -1       1     -1     -1    180.5
## 18          -1      1      -1      1     -1    118.0
## 19          -1     -1      -1     -1      1    120.5
## 20           1     -1      -1      1     -1    130.0
## 21           1      1       1      1     -1    261.0
## 22           1      1      -1      1     -1    142.0
## 23           1      1      -1      1      1    196.0
## 24          -1     -1       1      1     -1    143.5
## 25          -1      1      -1      1      1    152.5
## 26          -1      1       1     -1     -1    127.0
## 27          -1     -1      -1      1     -1    112.0
## 28           1     -1       1     -1      1    233.0
## 29          -1     -1       1      1      1    178.0
## 30           1      1       1     -1     -1    195.0
## 31          -1      1       1     -1      1    173.0
## 32          -1      1       1      1      1    196.0

Part C

State model equation and determine what factors and interactions appear to be significant

distance<-(p3data$distance)
A<-as.factor(p3data$ï..Fire_Ang)
B<-as.factor(p3data$Bungee)
C<-as.factor(p3data$Release)
D<-as.factor(p3data$Pin_El)
E<-as.factor(p3data$Cup_El)

p3m <- data.frame(A,B,C,D,E,distance)
p3mod<-lm(distance~A*B*C*D*E,data=p3m)

halfnormal(p3mod,ME.partial = TRUE)
## 
## Creation of A
## Projected out: (Intercept)
## 
## Creation of B
## Projected out: (Intercept),A
## 
## Creation of C
## Projected out: (Intercept),A,B
## 
## Creation of D
## Projected out: (Intercept),A,B,C
## 
## Creation of E
## Projected out: (Intercept),A,B,C,D
## 
## Creation of AB
## Projected out: (Intercept),A,B,C,D,E
## 
## Creation of AC
## Projected out: (Intercept),A,B,C,D,E,AB
## 
## Creation of BC
## Projected out: (Intercept),A,B,C,D,E,AB,AC
## 
## Creation of AD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC
## 
## Creation of BD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD
## 
## Creation of CD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD
## 
## Creation of AE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD
## 
## Creation of BE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE
## 
## Creation of CE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE
## 
## Creation of DE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE
## 
## Creation of ABC
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE
## 
## Creation of ABD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC
## 
## Creation of ACD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD
## 
## Creation of BCD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD
## 
## Creation of ABE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD
## 
## Creation of ACE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE
## 
## Creation of BCE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE
## 
## Creation of ADE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE
## 
## Creation of BDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE
## 
## Creation of CDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE
## 
## Creation of ABCD
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE
## 
## Creation of ABCE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE,ABCD
## 
## Creation of ABDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE,ABCD,ABCE
## 
## Creation of ACDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE,ABCD,ABCE,ABDE
## 
## Creation of BCDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE,ABCD,ABCE,ABDE,ACDE
## 
## Creation of ABCDE
## Projected out: (Intercept),A,B,C,D,E,AB,AC,BC,AD,BD,CD,AE,BE,CE,DE,ABC,ABD,ACD,BCD,ABE,ACE,BCE,ADE,BDE,CDE,ABCD,ABCE,ABDE,ACDE,BCDE
## 
## Significant effects (alpha=0.05, Lenth method):
##  [1] C1       A1       E1       A1:C1    D1       A1:D1    B1       A1:E1    
## 
##  [9] C1:E1    C1:D1    A1:C1:D1

coef(p3mod)
##    (Intercept)             A1             B1             C1             D1 
##           96.0            4.0            5.0           27.0           16.0 
##             E1          A1:B1          A1:C1          B1:C1          A1:D1 
##           24.5            7.0           53.5           -1.0           14.0 
##          B1:D1          C1:D1          A1:E1          B1:E1          C1:E1 
##            1.0            4.5           13.5            1.0            7.5 
##          D1:E1       A1:B1:C1       A1:B1:D1       A1:C1:D1       B1:C1:D1 
##            4.0            3.5           -1.0           17.0            2.5 
##       A1:B1:E1       A1:C1:E1       B1:C1:E1       A1:D1:E1       B1:D1:E1 
##           -2.5            7.0           13.0            1.5            5.0 
##       C1:D1:E1    A1:B1:C1:D1    A1:B1:C1:E1    A1:B1:D1:E1    A1:C1:D1:E1 
##           -1.5           12.0            2.0            7.0           21.5 
##    B1:C1:D1:E1 A1:B1:C1:D1:E1 
##           -8.5          -14.0

The following effects appear to be significant: A, B, C, D, E (All of them)

The following interactions appear to be significant: A:C, A:D, A:E, C:E, C:D and A:C:D

Based on these estimates,

Initial Model Equation:

\[y= A+B+C+D+E+A:C+A:D+A:E+C:E+C:D+A:C:D\]

Initial Regression Function:

\[ y=96.0+4.0A+5.0B+27.0C+16.0D+24.5E+53.5A:C+14.0A:D+13.5A:E+7.5C:E+4.5C:D+17.0A:C:D \]

Part D

After using insignificant factors/interactions to create an error term, perform ANOVA to determine a final model equation using an alpha = 0.05

The ANOVA will now be conducted on the initial model equation and all insignificant factors will be eliminated, if any remain.

p3mod2 = lm(distance~A+B+C+D+E+A*C+A*D+A*D+A*E+C*E+C*D+A*C*D,data=p3m)

anova(p3mod2)
## Analysis of Variance Table
## 
## Response: distance
##           Df Sum Sq Mean Sq F value    Pr(>F)    
## A          1  27671   27671 544.677 5.564e-16 ***
## B          1   1755    1755  34.551 9.477e-06 ***
## C          1  41616   41616 819.165 < 2.2e-16 ***
## D          1  10805   10805 212.674 4.041e-12 ***
## E          1  16200   16200 318.878 9.286e-14 ***
## A:C        1  11063   11063 217.768 3.251e-12 ***
## A:D        1   1938    1938  38.138 4.936e-06 ***
## A:E        1   1001    1001  19.709 0.0002519 ***
## C:E        1    703     703  13.840 0.0013520 ** 
## C:D        1    648     648  12.755 0.0019110 ** 
## A:C:D      1    458     458   9.006 0.0070601 ** 
## Residuals 20   1016      51                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
coef(p3mod2)
## (Intercept)          A1          B1          C1          D1          E1 
##     91.3750      2.4375     14.8125     24.1250     19.7500     24.4375 
##       A1:C1       A1:D1       A1:E1       C1:E1       C1:D1    A1:C1:D1 
##     59.2500     16.0000     22.3750     18.7500      2.8750     30.2500

All factors in the model are significant at an \(\alpha = 0.05\) level.

The model will be checked for adequacy.

plot(p3mod2)

Measurements 4, 28 and 13 residuals are a little excessive. The data points were checked and were collected correctly. The model looks pretty linear and nothing too alarming in the residuals.

Final Model Equation:

\[y= A+B+C+D+E+A:C+A:D+A:E+C:E+C:D+A:C:D\] Final Regression Function:

\[y= 91.4+2.4A+14.8B+24.1C+19.8D+24.4E+59.3A:C+16.0A:D+22.3A:E+18.8C:E+2.9C:D+30.3A:C:D\]

All Code Used

Below you will find a block containing all of the code used to generate this document.

library(agricolae)
library(DoE.base)

#Part A
trts <- c(2,2,2,2,2)
reps <- 1
seedNum <- 1234567
experiment <- design.ab(trt = trts, r=reps,design="crd",seed = seedNum)
experiment$book

#Part B
p3data<-read.csv("C:/Users/.../Part 3 csv.csv")
p3data

#Part C
distance<-(p3data$distance)
A<-as.factor(p3data$ï..Fire_Ang)
B<-as.factor(p3data$Bungee)
C<-as.factor(p3data$Release)
D<-as.factor(p3data$Pin_El)
E<-as.factor(p3data$Cup_El)
p3m <- data.frame(A,B,C,D,E,distance)
p3mod<-lm(distance~A*B*C*D*E,data=p3m)
halfnormal(p3mod,ME.partial = TRUE)
coef(p3mod)

#Part D
p3mod2 = lm(distance~A+B+C+D+E+A*C+A*D+A*D+A*E+C*E+C*D+A*C*D,data=p3m)
anova(p3mod2)
coef(p3mod2)
plot(p3mod2)