(c): We collected the data from statapult, listed in the code.
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.
Distance <- c(24,15,73,13.5,37,36,39,38,34,71,43,20,67,16,71,66,15,63)
Pin <- c(3,1,3,3,3,1,3,1,1,1,3,3,1,1,3,1,1,3)
Degree <- c(110,110,170,110,140,140,140,140,140,170,140,110,170,110,170,170,110,170)
Pin <- as.fixed(Pin)
Degree <- as.random(Degree)
model<-aov(Distance~Pin+Degree+Pin*Degree)
GAD::gad(model)
## Analysis of Variance Table
##
## Response: Distance
## Df Sum Sq Mean Sq F value Pr(>F)
## Pin 1 36.1 36.1 9.5275 0.09088 .
## Degree 2 7981.4 3990.7 311.9750 4.514e-11 ***
## Pin:Degree 2 7.6 3.8 0.2964 0.74877
## Residual 12 153.5 12.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot (model)




library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:matrixStats':
##
## count
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyr)
Distance <- c(24,15,73,13.5,37,36,39,38,34,71,43,20,67,16,71,66,15,63)
Pin <- c(3,1,3,3,3,1,3,1,1,1,3,3,1,1,3,1,1,3)
Degree <- c(110,110,170,110,140,140,140,140,140,170,140,110,170,110,170,170,110,170)
dat1 <- cbind(Distance,Pin,Degree)
dat1 <- as.data.frame(dat1)
Dist1<-dat1 %>% filter(Degree==110)%>% filter(Pin==1)
Dist2<-dat1 %>% filter(Degree==110)%>% filter(Pin==3)
Dist3<-dat1 %>% filter(Degree==140)%>% filter(Pin==1)
Dist4<-dat1 %>% filter(Degree==140)%>% filter(Pin==3)
Dist5<-dat1 %>% filter(Degree==170)%>% filter(Pin==1)
Dist6<-dat1 %>% filter(Degree==170)%>% filter(Pin==3)
Dist1 <- Dist1 %>% select(-Degree)%>% select(-Pin)
Dist1 <- as.numeric(Dist1$Distance)
Dist2 <- Dist2 %>% select(-Degree)%>% select(-Pin)
Dist2 <- as.numeric(Dist2$Distance)
Dist3 <- Dist3 %>% select(-Degree)%>% select(-Pin)
Dist3 <- as.numeric(Dist3$Distance)
Dist4 <- Dist4 %>% select(-Degree)%>% select(-Pin)
Dist4 <- as.numeric(Dist4$Distance)
Dist5 <- Dist5 %>% select(-Degree)%>% select(-Pin)
Dist5 <- as.numeric(Dist5$Distance)
Dist6 <- Dist6 %>% select(-Degree)%>% select(-Pin)
Dist6 <- as.numeric(Dist6$Distance)
avg1 <- ave(Dist1)
avg2 <- ave(Dist2)
avg3 <- ave(Dist3)
avg4 <- ave(Dist4)
avg5 <- ave(Dist5)
avg6 <- ave(Dist6)
Deg <- c(110,110,110,140,140,140,170,170,170)
Deg1 <- c(110,110,110)
Deg2<- c(140,140,140)
Deg3 <- c(170,170,170)
plot(Deg, c(Dist1,Dist3,Dist5),main="Scatterplot with average", xlab="Degree",ylab="Distance", pch=19, col="red")
lines(Deg, c(avg1,avg3,avg5), type = "b", col = "red", lwd = 3, pch = 15)
points(Deg,c(Dist2,Dist4,Dist6),pch = 19,col="blue")
lines(Deg, c(avg2,avg4,avg6), type = "b", col = "blue", lwd = 3, pch = 15)
legend(x=110,y=60,c("Pin Location=1","Pin Location=3"),pch=c(19,19),col = c("red","blue"))

(d):
Since P-value of Pin:Degree=0.74877 >0.1, fail to reject null hypothesis, no interaction. We also provide the interaction plot desipte it is not required in this case, since we drew the conclusion of no interaction. From the interaction plot, we also know that they are also almost in parallel, we confirm no interaction.
P-value of Degree= 4.514e-11 <0.1, reject null hypothesis, degree has impact on means. P-value of Degree= 0.09088 <0.1, reject null hypothesis, pin location has impact on means. However, this is highly dependent upon the alpha value. If we assume this threshold to be 0.05, pin location impact would turn to be insignificant.
Even if we are required by question to use the raw data regardless of normality and variance constancy, we provide a few insights herein as supplimentary.
From Normality Plot, we can see it passes fat pencil test, so it is normally distributed. From the Residue Plot, we can say, constancy of variance is not perfect but still accepable, but since we only have 3 replicates for each condition, it is recommended to run the experiments for more times to stabalize the redisue plot to boost our confidence of drawing conclusions.