Y<-c(69.38,
69.72,
69.58,
69.50,
69.48,
69.56,
69.90,
69.60,
69.80,
69.70,
69.50,
69.40,
69.40,
70.02,
69.62,
69.78,
69.70,
69.46,
69.50,
69.68,
69.94,
69.52,
69.90,
69.92,
69.50,
69.42,
69.64,
69.88)
Piezas<-rep(1:7,4)
Inspector<-rep(1:2,each=14)
df<-data.frame(Piezas=as.factor(Piezas),Inspector=as.factor(Inspector),Y)
library(lme4)
## Loading required package: Matrix
modelo<-lmer(Y~(1|Piezas)+(1|Inspector)+(1|Piezas:Inspector),data=df)
#modelo<-lm(Y~Piezas*Inspector,data=df)
summary(modelo)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Y ~ (1 | Piezas) + (1 | Inspector) + (1 | Piezas:Inspector)
##    Data: df
## 
## REML criterion at convergence: -33.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.69924 -0.55074  0.06051  0.44442  2.00487 
## 
## Random effects:
##  Groups           Name        Variance Std.Dev.
##  Piezas:Inspector (Intercept) 0.000331 0.01819 
##  Piezas           (Intercept) 0.030600 0.17493 
##  Inspector        (Intercept) 0.001598 0.03997 
##  Residual                     0.007200 0.08485 
## Number of obs: 28, groups:  Piezas:Inspector, 14; Piezas, 7; Inspector, 2
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept) 69.64286    0.07383   943.3