df<-read.csv("https://raw.githubusercontent.com/PedroGonzalezBeermann2020/DExperimental2021/main/Problema2.csv")
df
##    IndividuO  Mano Largo
## 1          A  Left  17.5
## 2          B  Left  18.4
## 3          C  Left  16.2
## 4          D  Left  14.5
## 5          E  Left  13.5
## 6          F  Left  18.9
## 7          G  Left  19.5
## 8          H  Left  21.1
## 9          I  Left  17.8
## 10         J  Left  16.8
## 11         K  Left  18.4
## 12         L  Left  17.3
## 13         M  Left  18.9
## 14         N  Left  16.4
## 15         O  Left  17.5
## 16         P  Left  15.0
## 17         A Right  17.6
## 18         B Right  18.5
## 19         C Right  15.9
## 20         D Right  14.9
## 21         E Right  13.7
## 22         F Right  18.9
## 23         G Right  19.5
## 24         H Right  21.5
## 25         I Right  18.5
## 26         J Right  17.1
## 27         K Right  18.9
## 28         L Right  17.5
## 29         M Right  19.5
## 30         N Right  16.5
## 31         O Right  17.4
## 32         P Right  15.6
df$IndividuO=factor(df$IndividuO)
df$Largo=as.numeric(df$Largo)
df
##    IndividuO  Mano Largo
## 1          A  Left  17.5
## 2          B  Left  18.4
## 3          C  Left  16.2
## 4          D  Left  14.5
## 5          E  Left  13.5
## 6          F  Left  18.9
## 7          G  Left  19.5
## 8          H  Left  21.1
## 9          I  Left  17.8
## 10         J  Left  16.8
## 11         K  Left  18.4
## 12         L  Left  17.3
## 13         M  Left  18.9
## 14         N  Left  16.4
## 15         O  Left  17.5
## 16         P  Left  15.0
## 17         A Right  17.6
## 18         B Right  18.5
## 19         C Right  15.9
## 20         D Right  14.9
## 21         E Right  13.7
## 22         F Right  18.9
## 23         G Right  19.5
## 24         H Right  21.5
## 25         I Right  18.5
## 26         J Right  17.1
## 27         K Right  18.9
## 28         L Right  17.5
## 29         M Right  19.5
## 30         N Right  16.5
## 31         O Right  17.4
## 32         P Right  15.6
modelo<-lm(Largo~IndividuO,data = df)
anova<-aov(modelo)
summary(anova)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## IndividuO   15 114.68   7.645   117.6 1.79e-13 ***
## Residuals   16   1.04   0.065                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
library(lme4)
## Loading required package: Matrix
fit.Individuo <- lmer(Largo ~ (1 | IndividuO) + (1| Mano), data =df)
summary(fit.Individuo)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Largo ~ (1 | IndividuO) + (1 | Mano)
##    Data: df
## 
## REML criterion at convergence: 72.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.34131 -0.49867 -0.05118  0.56707  1.26746 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  IndividuO (Intercept) 3.80298  1.9501  
##  Mano      (Intercept) 0.02575  0.1605  
##  Residual              0.03925  0.1981  
## Number of obs: 32, groups:  IndividuO, 16; Mano, 2
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept)  17.4750     0.5018   34.83
shapiro.test(anova$residuals)
## 
##  Shapiro-Wilk normality test
## 
## data:  anova$residuals
## W = 0.97949, p-value = 0.7847
library(pid)
## Registered S3 method overwritten by 'DoE.base':
##   method           from       
##   factorize.factor conf.design
paretoPlot(anova)

modelo2<-lm(Largo~IndividuO*Mano, data=df)
anova<-aov(modelo2)
summary(anova)
##                Df Sum Sq Mean Sq
## IndividuO      15 114.68   7.645
## Mano            1   0.45   0.451
## IndividuO:Mano 15   0.59   0.039
library(pid)
paretoPlot(modelo2)

Según el test de shapiro wilk, los datos provienen de una distribución normal, ta que P>0.05 con 95% de confianza. Por su parte en el test de anova no se observan factores significantes, sin embargo en el gráfico de paretoel individuoH, tiene un efecto positivo con una magnitud mayor de 3 y la interacción más importante es del individuo(O) con mano derecha, en ningun caso existe interacción con mano izquierda. Esto con 95% de confianza.