Part A

Model Equation

\(Y_{ijk} = \mu +\alpha _{i} + (\beta_{j})_{i} + \varepsilon _{ijk}\)

Part B

Hypothesis

Null Hypothesis: \((\beta_{j})_{i} = 0\)

Alternate Hypothesis: \((\beta_{j})_{i} \neq 0\)

Part C

Process<-c(rep(1,4),rep(2,4),rep(3,4))
Process<-rep(Process,3)
Batch<-seq(1,4)
Batch<-rep(Batch,9)
Obs<-c(rep(1,12),rep(2,12),rep(3,12))
results<-c(25,19,15,15,29,23,28,35,24,35,38,25,
           30,28,17,16,27,24,21,27,25,21,34,29,
           26,20,14,13,24,21,27,25,20,24,30,33)
dat1<-data.frame(Process,Batch,Obs,results)
library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
dat1$Process<-as.random(dat1$Process)
dat1$Batch<-as.fixed(dat1$Batch)
dat1$Obs<-as.fixed(dat1$Obs)
model1<-lm(results~Obs+Batch%in%Process,data = dat1)
summary(model1)
## 
## Call:
## lm(formula = results ~ Obs + Batch %in% Process, data = dat1)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.9444 -1.4861 -0.1944  1.3889  7.0556 
## 
## Coefficients: (1 not defined because of singularities)
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      3.028e+01  2.345e+00  12.911 9.63e-12 ***
## Obs2            -1.000e+00  1.535e+00  -0.651 0.521553    
## Obs3            -2.833e+00  1.535e+00  -1.846 0.078459 .  
## Batch1:Process1 -2.000e+00  3.070e+00  -0.651 0.521553    
## Batch2:Process1 -6.667e+00  3.070e+00  -2.171 0.040975 *  
## Batch3:Process1 -1.367e+01  3.070e+00  -4.451 0.000200 ***
## Batch4:Process1 -1.433e+01  3.070e+00  -4.668 0.000118 ***
## Batch1:Process2 -2.333e+00  3.070e+00  -0.760 0.455361    
## Batch2:Process2 -6.333e+00  3.070e+00  -2.063 0.051144 .  
## Batch3:Process2 -3.667e+00  3.070e+00  -1.194 0.245124    
## Batch4:Process2  2.867e-16  3.070e+00   0.000 1.000000    
## Batch1:Process3 -6.000e+00  3.070e+00  -1.954 0.063516 .  
## Batch2:Process3 -2.333e+00  3.070e+00  -0.760 0.455361    
## Batch3:Process3  5.000e+00  3.070e+00   1.628 0.117671    
## Batch4:Process3         NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.761 on 22 degrees of freedom
## Multiple R-squared:  0.7736, Adjusted R-squared:  0.6399 
## F-statistic: 5.783 on 13 and 22 DF,  p-value: 0.0001669