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.
machine<-c(rep(1,8),rep(2,8),rep(3,8))
spindle<-rep(c(rep(1,4),rep(2,4)),3)
observation<-c(12,9,11,12,8,9,10,8,14,15,13,14,12,10,11,13,14,10,12,11,16,15,15,14)
dat<-data.frame(machine,spindle,observation)
machine<-as.fixed(machine)
spindle<-as.random(spindle)
model<-lm(observation~machine+spindle%in%machine)
gad(model)
## Analysis of Variance Table
##
## Response: observation
## Df Sum Sq Mean Sq F value Pr(>F)
## machine 2 55.75 27.8750 1.9114 0.2915630
## machine:spindle 3 43.75 14.5833 9.9057 0.0004428 ***
## Residual 18 26.50 1.4722
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
As the p value in this case of spindle nested within machine is less than 0.05 hence it is significant