Getting in data

process<-c(rep(1,12),rep(2,12),rep(3,12))
batch<-rep(c(rep(1,3),rep(2,3),rep(3,3),rep(4,3)),3)
obs<-c(25,30,26,19,28,20,15,17,14,15,16,13,29,27,24,23,24,21,28,21,27,35,27,25,24,25,20,35,21,24,38,34,30,25,29,33)
dat<-data.frame(process,batch,obs)

#question 1

yikj=mu+alpha i +beta(i) +eilj

Question 2

#alpha:beta(i) =0

#alpha:beta(i) not equals to zero

library(GAD)
## Warning: package 'GAD' was built under R version 4.1.3
## Loading required package: matrixStats
## Warning: package 'matrixStats' was built under R version 4.1.3
## Loading required package: R.methodsS3
## Warning: package 'R.methodsS3' was built under R version 4.1.3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
dat$process<-as.fixed(dat$process)
dat$batch<-as.random(dat$batch)
model<-lm(obs~process+batch%in%process,data=dat)
gad(model)
## Analysis of Variance Table
## 
## Response: obs
##               Df Sum Sq Mean Sq F value   Pr(>F)   
## process        2 446.06 223.028  3.5365 0.073563 . 
## process:batch  9 567.58  63.065  4.1965 0.002349 **
## Residual      24 360.67  15.028                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

the batch in process is significant(0.002349) at alpha 0.05 and because of this we would stop here

plot(model)

Model is normally distributed ( Data falls on a straight line)

But the variance is not constant ( Varying spread in residual)