1. Diseño en bloques aleatorizados.

1.1. Datos.

Los datos son tomados del libro Diseño y análisis de experimentos de Douglas Montgomery. Página 127.

dureza<-c(9.3,9.4,9.6,10.0,9.4,9.3,9.8,9.9,9.2,9.4,9.5,9.7,9.7,9.6,10.0,10.2)
ejemplar<-rep(c("1","2","3","4"),4)
punta<-rep(c("1","2","3","4"),c(4,4,4,4))
datos1<-data.frame(ejemplar,punta,dureza)

1.2. Análisis de varianza.

anova1<-aov(dureza~punta+ejemplar)
summary(anova1)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## punta        3  0.385 0.12833   14.44 0.000871 ***
## ejemplar     3  0.825 0.27500   30.94 4.52e-05 ***
## Residuals    9  0.080 0.00889                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

1.3 Estimación y residuos.

estima1<-predict(anova1);estima1
##      1      2      3      4      5      6      7      8      9     10     11 
##  9.350  9.375  9.675  9.900  9.375  9.400  9.700  9.925  9.225  9.250  9.550 
##     12     13     14     15     16 
##  9.775  9.650  9.675  9.975 10.200
error1<-resid(anova1);error1
##             1             2             3             4             5 
## -5.000000e-02  2.500000e-02 -7.500000e-02  1.000000e-01  2.500000e-02 
##             6             7             8             9            10 
## -1.000000e-01  1.000000e-01 -2.500000e-02 -2.500000e-02  1.500000e-01 
##            11            12            13            14            15 
## -5.000000e-02 -7.500000e-02  5.000000e-02 -7.500000e-02  2.500000e-02 
##            16 
## -3.556183e-16
qqnorm(error1)
qqline(error1)

plot(punta,error1,pch=16)
abline(h=0)

plot(ejemplar,error1)
abline(h=0)

plot(estima1,error1)
abline(h=0)

1.4. Pruebas de normalidad de los residuos.

ks.test(error1,"pnorm")
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  error1
## D = 0.46017, p-value = 0.001278
## alternative hypothesis: two-sided
lillie.test(error1)
## 
##  Lilliefors (Kolmogorov-Smirnov) normality test
## 
## data:  error1
## D = 0.13395, p-value = 0.62
ad.test(error1)
## 
##  Anderson-Darling normality test
## 
## data:  error1
## A = 0.37514, p-value = 0.3704

1.5. Pruebas para homogeneidad de varianzas.

bartlett.test(dureza,punta)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  dureza and punta
## Bartlett's K-squared = 0.44773, df = 3, p-value = 0.9302
leveneTest(dureza,punta, location=c("mean"), trim.alpha=0.05)
## Warning in leveneTest.default(dureza, punta, location = c("mean"), trim.alpha =
## 0.05): punta coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("mean"))
##       Df F value Pr(>F)
## group  3  0.4865  0.698
##       12
leveneTest(dureza,punta, location=c("median"), trim.alpha=0.05)
## Warning in leveneTest.default(dureza, punta, location = c("median"), trim.alpha
## = 0.05): punta coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("median"))
##       Df F value Pr(>F)
## group  3  0.4865  0.698
##       12

1.6. Comparaciones múltiples.

tuk1<-TukeyHSD(anova1)
tuk1
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = dureza ~ punta + ejemplar)
## 
## $punta
##       diff         lwr        upr     p adj
## 2-1  0.025 -0.18311992 0.23311992 0.9809005
## 3-1 -0.125 -0.33311992 0.08311992 0.3027563
## 4-1  0.300  0.09188008 0.50811992 0.0066583
## 3-2 -0.150 -0.35811992 0.05811992 0.1815907
## 4-2  0.275  0.06688008 0.48311992 0.0113284
## 4-3  0.425  0.21688008 0.63311992 0.0006061
## 
## $ejemplar
##      diff         lwr       upr     p adj
## 2-1 0.025 -0.18311992 0.2331199 0.9809005
## 3-1 0.325  0.11688008 0.5331199 0.0039797
## 4-1 0.550  0.34188008 0.7581199 0.0000830
## 3-2 0.300  0.09188008 0.5081199 0.0066583
## 4-2 0.525  0.31688008 0.7331199 0.0001200
## 4-3 0.225  0.01688008 0.4331199 0.0341762
plot(tuk1)

df1<-df.residual(anova1)
cme1<-deviance(anova1)/df1
fisher1 <- LSD.test(dureza,punta,df1,cme1, p.adj="bonferroni", group=TRUE,
main="dureza")
fisher1
## $statistics
##       MSerror Df  Mean        CV  t.value       MSD
##   0.008888889  9 9.625 0.9795419 3.364203 0.2242802
## 
## $parameters
##         test  p.ajusted name.t ntr alpha
##   Fisher-LSD bonferroni  punta   4  0.05
## 
## $means
##   dureza       std r      LCL      UCL Min  Max   Q25  Q50    Q75
## 1  9.575 0.3095696 4 9.468361 9.681639 9.3 10.0 9.375 9.50  9.700
## 2  9.600 0.2943920 4 9.493361 9.706639 9.3  9.9 9.375 9.60  9.825
## 3  9.450 0.2081666 4 9.343361 9.556639 9.2  9.7 9.350 9.45  9.550
## 4  9.875 0.2753785 4 9.768361 9.981639 9.6 10.2 9.675 9.85 10.050
## 
## $comparison
## NULL
## 
## $groups
##   dureza groups
## 4  9.875      a
## 2  9.600      b
## 1  9.575      b
## 3  9.450      b
## 
## attr(,"class")
## [1] "group"
newman1 <- SNK.test(dureza,punta,df1,cme1, group=TRUE)
newman1
## $statistics
##       MSerror Df  Mean        CV
##   0.008888889  9 9.625 0.9795419
## 
## $parameters
##   test name.t ntr alpha
##    SNK  punta   4  0.05
## 
## $snk
##      Table CriticalRange
## 2 3.199173     0.1508105
## 3 3.948492     0.1861337
## 4 4.414890     0.2081199
## 
## $means
##   dureza       std r Min  Max   Q25  Q50    Q75
## 1  9.575 0.3095696 4 9.3 10.0 9.375 9.50  9.700
## 2  9.600 0.2943920 4 9.3  9.9 9.375 9.60  9.825
## 3  9.450 0.2081666 4 9.2  9.7 9.350 9.45  9.550
## 4  9.875 0.2753785 4 9.6 10.2 9.675 9.85 10.050
## 
## $comparison
## NULL
## 
## $groups
##   dureza groups
## 4  9.875      a
## 2  9.600      b
## 1  9.575      b
## 3  9.450      b
## 
## attr(,"class")
## [1] "group"
plot(newman1)
dun1 <- duncan.test(dureza,punta,df1,cme1, group=TRUE)
dun1
## $statistics
##       MSerror Df  Mean        CV
##   0.008888889  9 9.625 0.9795419
## 
## $parameters
##     test name.t ntr alpha
##   Duncan  punta   4  0.05
## 
## $duncan
##      Table CriticalRange
## 2 3.199173     0.1508105
## 3 3.339138     0.1574085
## 4 3.419765     0.1612093
## 
## $means
##   dureza       std r Min  Max   Q25  Q50    Q75
## 1  9.575 0.3095696 4 9.3 10.0 9.375 9.50  9.700
## 2  9.600 0.2943920 4 9.3  9.9 9.375 9.60  9.825
## 3  9.450 0.2081666 4 9.2  9.7 9.350 9.45  9.550
## 4  9.875 0.2753785 4 9.6 10.2 9.675 9.85 10.050
## 
## $comparison
## NULL
## 
## $groups
##   dureza groups
## 4  9.875      a
## 2  9.600      b
## 1  9.575      b
## 3  9.450      b
## 
## attr(,"class")
## [1] "group"
plot(dun1)

sch1 <- scheffe.test(dureza,punta,df1,cme1, group=TRUE,main="Dureza")
sch1
## $statistics
##       MSerror Df        F  Mean        CV  Scheffe CriticalDifference
##   0.008888889  9 3.862548 9.625 0.9795419 3.404063          0.2269375
## 
## $parameters
##      test name.t ntr alpha
##   Scheffe  punta   4  0.05
## 
## $means
##   dureza       std r Min  Max   Q25  Q50    Q75
## 1  9.575 0.3095696 4 9.3 10.0 9.375 9.50  9.700
## 2  9.600 0.2943920 4 9.3  9.9 9.375 9.60  9.825
## 3  9.450 0.2081666 4 9.2  9.7 9.350 9.45  9.550
## 4  9.875 0.2753785 4 9.6 10.2 9.675 9.85 10.050
## 
## $comparison
## NULL
## 
## $groups
##   dureza groups
## 4  9.875      a
## 2  9.600      b
## 1  9.575      b
## 3  9.450      b
## 
## attr(,"class")
## [1] "group"

2. Diseño en cuadrado latino.

2.1. Datos.

Los datos son tomados del libro Diseño y análisis de experimentos de Douglas Montgomery. Página 144.

carga<-c(24,20,19,24,24,17,24,30,27,36,18,38,26,27,21,26,31,26,23,22,22,30,20,29,31)
operador<-rep(c("1","2","3","4","5"),5)
lote<-rep(c("1","2","3","4","5"),c(5,5,5,5,5))
formula<-c("A","B","C","D","E","B","C","D","E","A","C","D","E","A","B","D","E","A","B","C","E","A","B","C","D")
datos2<-cbind(operador,lote,formula,carga)

2.2. Análisis de varianza.

anova3<-aov(carga~formula+lote+operador)
summary(anova3)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## formula      4    330   82.50   7.734 0.00254 **
## lote         4     68   17.00   1.594 0.23906   
## operador     4    150   37.50   3.516 0.04037 * 
## Residuals   12    128   10.67                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

2.3. Estimación y residuos.

estima2<-predict(anova3);estima2
##    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16 
## 21.4 20.2 18.0 27.2 24.2 17.6 27.0 30.0 28.0 31.4 19.0 33.6 25.4 29.8 22.2 26.0 
##   17   18   19   20   21   22   23   24   25 
## 29.4 27.6 21.0 24.0 23.0 32.8 20.0 24.0 32.2
error2<-resid(anova3);error2
##             1             2             3             4             5 
##  2.600000e+00 -2.000000e-01  1.000000e+00 -3.200000e+00 -2.000000e-01 
##             6             7             8             9            10 
## -6.000000e-01 -3.000000e+00  5.551115e-17 -1.000000e+00  4.600000e+00 
##            11            12            13            14            15 
## -1.000000e+00  4.400000e+00  6.000000e-01 -2.800000e+00 -1.200000e+00 
##            16            17            18            19            20 
## -2.609024e-15  1.600000e+00 -1.600000e+00  2.000000e+00 -2.000000e+00 
##            21            22            23            24            25 
## -1.000000e+00 -2.800000e+00  9.992007e-16  5.000000e+00 -1.200000e+00
qqnorm(error2)
qqline(error2)

plot(estima2,error2,pch=16)
abline(h=0)

plot(lote,error2)
abline(h=0)

plot(operador,error2,pch=16)
abline(h=0)

2.4. Pruebas de normalidad de los residuos.

ks.test(error2,"pnorm")
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  error2
## D = 0.28134, p-value = 0.03044
## alternative hypothesis: two-sided
lillie.test(error2)
## 
##  Lilliefors (Kolmogorov-Smirnov) normality test
## 
## data:  error2
## D = 0.18, p-value = 0.03581
ad.test(error2)
## 
##  Anderson-Darling normality test
## 
## data:  error2
## A = 0.65237, p-value = 0.07829

2.5. Pruebas para homogeneidad de varianzas.

bartlett.test(carga,formula)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  carga and formula
## Bartlett's K-squared = 3.0816, df = 4, p-value = 0.5443
leveneTest(carga,formula, location=c("mean"), trim.alpha=0.05)
## Warning in leveneTest.default(carga, formula, location = c("mean"), trim.alpha =
## 0.05): formula coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("mean"))
##       Df F value Pr(>F)
## group  4  0.5858 0.6766
##       20
leveneTest(carga,formula, location=c("median"), trim.alpha=0.05)
## Warning in leveneTest.default(carga, formula, location = c("median"), trim.alpha
## = 0.05): formula coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("median"))
##       Df F value Pr(>F)
## group  4  0.5858 0.6766
##       20

2.6. Comparaciones múltiples.

tuk2<-TukeyHSD(anova3);tuk2
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = carga ~ formula + lote + operador)
## 
## $formula
##     diff         lwr        upr     p adj
## B-A -8.4 -14.9839317 -1.8160683 0.0110827
## C-A -6.2 -12.7839317  0.3839317 0.0684350
## D-A  1.2  -5.3839317  7.7839317 0.9754380
## E-A -2.6  -9.1839317  3.9839317 0.7194121
## C-B  2.2  -4.3839317  8.7839317 0.8204614
## D-B  9.6   3.0160683 16.1839317 0.0041583
## E-B  5.8  -0.7839317 12.3839317 0.0944061
## D-C  7.4   0.8160683 13.9839317 0.0254304
## E-C  3.6  -2.9839317 10.1839317 0.4461852
## E-D -3.8 -10.3839317  2.7839317 0.3966727
## 
## $lote
##     diff       lwr       upr     p adj
## 2-1  4.6 -1.983932 11.183932 0.2341812
## 3-1  3.8 -2.783932 10.383932 0.3966727
## 4-1  3.4 -3.183932  9.983932 0.4985311
## 5-1  4.2 -2.383932 10.783932 0.3079352
## 3-2 -0.8 -7.383932  5.783932 0.9945757
## 4-2 -1.2 -7.783932  5.383932 0.9754380
## 5-2 -0.4 -6.983932  6.183932 0.9996368
## 4-3 -0.4 -6.983932  6.183932 0.9996368
## 5-3  0.4 -6.183932  6.983932 0.9996368
## 5-4  0.8 -5.783932  7.383932 0.9945757
## 
## $operador
##     diff         lwr       upr     p adj
## 2-1  7.2   0.6160683 13.783932 0.0300318
## 3-1  2.8  -3.7839317  9.383932 0.6646176
## 4-1  4.6  -1.9839317 11.183932 0.2341812
## 5-1  5.4  -1.1839317 11.983932 0.1292447
## 3-2 -4.4 -10.9839317  2.183932 0.2691629
## 4-2 -2.6  -9.1839317  3.983932 0.7194121
## 5-2 -1.8  -8.3839317  4.783932 0.9019734
## 4-3  1.8  -4.7839317  8.383932 0.9019734
## 5-3  2.6  -3.9839317  9.183932 0.7194121
## 5-4  0.8  -5.7839317  7.383932 0.9945757
plot(tuk2)

df2<-df.residual(anova3)
cme2<-deviance(anova3)/df2
fisher2 <- LSD.test(carga,formula,df2,cme2, p.adj="bonferroni", group=TRUE,
main="carga")
fisher2
## $statistics
##    MSerror Df Mean       CV  t.value      MSD
##   10.66667 12 25.4 12.85821 3.428444 7.081764
## 
## $parameters
##         test  p.ajusted  name.t ntr alpha
##   Fisher-LSD bonferroni formula   5  0.05
## 
## $means
##   carga      std r      LCL      UCL Min Max Q25 Q50 Q75
## A  28.6 4.669047 5 25.41764 31.78236  24  36  26  27  30
## B  20.2 2.167948 5 17.01764 23.38236  17  23  20  20  21
## C  22.4 4.393177 5 19.21764 25.58236  18  29  19  22  24
## D  29.8 5.403702 5 26.61764 32.98236  24  38  26  30  31
## E  26.0 3.391165 5 22.81764 29.18236  22  31  24  26  27
## 
## $comparison
## NULL
## 
## $groups
##   carga groups
## D  29.8      a
## A  28.6     ab
## E  26.0    abc
## C  22.4     bc
## B  20.2      c
## 
## attr(,"class")
## [1] "group"
newman2 <- SNK.test(carga,formula,df2,cme2, group=TRUE)
newman2
## $statistics
##    MSerror Df Mean       CV
##   10.66667 12 25.4 12.85821
## 
## $parameters
##   test  name.t ntr alpha
##    SNK formula   5  0.05
## 
## $snk
##      Table CriticalRange
## 2 3.081307      4.500536
## 3 3.772929      5.510715
## 4 4.198660      6.132536
## 5 4.507710      6.583932
## 
## $means
##   carga      std r Min Max Q25 Q50 Q75
## A  28.6 4.669047 5  24  36  26  27  30
## B  20.2 2.167948 5  17  23  20  20  21
## C  22.4 4.393177 5  18  29  19  22  24
## D  29.8 5.403702 5  24  38  26  30  31
## E  26.0 3.391165 5  22  31  24  26  27
## 
## $comparison
## NULL
## 
## $groups
##   carga groups
## D  29.8      a
## A  28.6      a
## E  26.0     ab
## C  22.4     bc
## B  20.2      c
## 
## attr(,"class")
## [1] "group"
plot(newman2)
dun2 <- duncan.test(carga,formula,df2,cme2, group=TRUE)
dun2
## $statistics
##    MSerror Df Mean       CV
##   10.66667 12 25.4 12.85821
## 
## $parameters
##     test  name.t ntr alpha
##   Duncan formula   5  0.05
## 
## $duncan
##      Table CriticalRange
## 2 3.081307      4.500536
## 3 3.225244      4.710770
## 4 3.312453      4.838147
## 5 3.370172      4.922451
## 
## $means
##   carga      std r Min Max Q25 Q50 Q75
## A  28.6 4.669047 5  24  36  26  27  30
## B  20.2 2.167948 5  17  23  20  20  21
## C  22.4 4.393177 5  18  29  19  22  24
## D  29.8 5.403702 5  24  38  26  30  31
## E  26.0 3.391165 5  22  31  24  26  27
## 
## $comparison
## NULL
## 
## $groups
##   carga groups
## D  29.8      a
## A  28.6      a
## E  26.0     ab
## C  22.4     bc
## B  20.2      c
## 
## attr(,"class")
## [1] "group"
plot(dun2)

sch2 <- scheffe.test(carga,formula,df2,cme2, group=TRUE,main="carga")
sch2
## $statistics
##    MSerror Df        F Mean       CV  Scheffe CriticalDifference
##   10.66667 12 3.259167 25.4 12.85821 3.610632            7.45809
## 
## $parameters
##      test  name.t ntr alpha
##   Scheffe formula   5  0.05
## 
## $means
##   carga      std r Min Max Q25 Q50 Q75
## A  28.6 4.669047 5  24  36  26  27  30
## B  20.2 2.167948 5  17  23  20  20  21
## C  22.4 4.393177 5  18  29  19  22  24
## D  29.8 5.403702 5  24  38  26  30  31
## E  26.0 3.391165 5  22  31  24  26  27
## 
## $comparison
## NULL
## 
## $groups
##   carga groups
## D  29.8      a
## A  28.6      a
## E  26.0     ab
## C  22.4     ab
## B  20.2      b
## 
## attr(,"class")
## [1] "group"

3. Diseño en cuadrado greco-latino.

3.1. Datos.

Los datos son tomados del libro Diseño y análisis de experimentos de Douglas Montgomery. Página 153.

car<-c(-1,-5,-6,-1,-1,-8,-1,5,2,11,-7,13,1,2,-4,1,6,1,-2,-3,-3,5,-5,4,6)
montaje<-c("M1","M3","M5","M2","M4","M2","M4","M1","M3","M5","M3","M5","M2","M4","M1","M3","M1","M3","M5","M2","M5","M2","M4","M1","M3")
opera<-rep(c("1","2","3","4","5"),5)
lot<-rep(c("1","2","3","4","5"),c(5,5,5,5,5))
forma<-c("A","B","C","D","E","B","C","D","E","A","C","D","E","A","B","D","E","A","B","C","E","A","B","C","D")

3.2. Análisis de varianza.

anova4<-aov(car~forma+lot+opera+montaje)
summary(anova4)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## forma        4  330.0   82.50  10.190 0.00315 **
## lot          4   68.0   17.00   2.100 0.17265   
## opera        4  150.0   37.50   4.632 0.03138 * 
## montaje      4   63.2   15.81   1.953 0.19508   
## Residuals    8   64.8    8.10                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

3.3. Estimación y residuos.

estima3<-predict(anova4);estima3
##          1          2          3          4          5          6          7 
## -2.0666667 -5.4666667 -4.7000000  0.5333333 -2.3000000 -9.0666667  0.5000000 
##          8          9         10         11         12         13         14 
##  6.5333333  2.3333333  8.7000000 -6.8333333 10.7333333 -1.1000000  3.3000000 
##         15         16         17         18         19         20         21 
## -1.1000000 -0.1666667  5.9333333  1.7666667 -1.8666667 -2.6666667  0.1333333 
##         22         23         24         25 
##  6.3000000 -6.5000000  0.7000000  6.3666667
error3<-resid(anova4);error3
##           1           2           3           4           5           6 
##  1.06666667  0.46666667 -1.30000000 -1.53333333  1.30000000  1.06666667 
##           7           8           9          10          11          12 
## -1.50000000 -1.53333333 -0.33333333  2.30000000 -0.16666667  2.26666667 
##          13          14          15          16          17          18 
##  2.10000000 -1.30000000 -2.90000000  1.16666667  0.06666667 -0.76666667 
##          19          20          21          22          23          24 
## -0.13333333 -0.33333333 -3.13333333 -1.30000000  1.50000000  3.30000000 
##          25 
## -0.36666667
qqnorm(error3)
qqline(error3)

plot(estima3,error3,pch=16)
abline(h=0)

3.4. normalidad de los residuos.

ks.test(error3,"pnorm")
## Warning in ks.test(error3, "pnorm"): ties should not be present for the
## Kolmogorov-Smirnov test
## 
##  One-sample Kolmogorov-Smirnov test
## 
## data:  error3
## D = 0.2232, p-value = 0.1656
## alternative hypothesis: two-sided
lillie.test(error3)
## 
##  Lilliefors (Kolmogorov-Smirnov) normality test
## 
## data:  error3
## D = 0.10563, p-value = 0.6696
ad.test(error3)
## 
##  Anderson-Darling normality test
## 
## data:  error3
## A = 0.28276, p-value = 0.6055

3.5. Homogeneidad de varianzas.

bartlett.test(car,forma)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  car and forma
## Bartlett's K-squared = 3.0816, df = 4, p-value = 0.5443
leveneTest(car,forma, location=c("mean"), trim.alpha=0.05)
## Warning in leveneTest.default(car, forma, location = c("mean"), trim.alpha =
## 0.05): forma coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("mean"))
##       Df F value Pr(>F)
## group  4  0.5858 0.6766
##       20
leveneTest(car,forma, location=c("median"), trim.alpha=0.05)
## Warning in leveneTest.default(car, forma, location = c("median"), trim.alpha =
## 0.05): forma coerced to factor.
## Levene's Test for Homogeneity of Variance (center = median: c("median"))
##       Df F value Pr(>F)
## group  4  0.5858 0.6766
##       20

3.6. Comparaciones múltiples.

tuk3<-TukeyHSD(anova4);tuk3
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = car ~ forma + lot + opera + montaje)
## 
## $forma
##     diff         lwr        upr     p adj
## B-A -8.4 -14.6169503 -2.1830497 0.0102087
## C-A -6.2 -12.4169503  0.0169503 0.0506448
## D-A  1.2  -5.0169503  7.4169503 0.9583246
## E-A -2.6  -8.8169503  3.6169503 0.6195880
## C-B  2.2  -4.0169503  8.4169503 0.7402499
## D-B  9.6   3.3830497 15.8169503 0.0045658
## E-B  5.8  -0.4169503 12.0169503 0.0685959
## D-C  7.4   1.1830497 13.6169503 0.0207648
## E-C  3.6  -2.6169503  9.8169503 0.3447704
## E-D -3.8 -10.0169503  2.4169503 0.3013038
## 
## $lot
##     diff      lwr      upr     p adj
## 2-1  4.6 -1.61695 10.81695 0.1698430
## 3-1  3.8 -2.41695 10.01695 0.3013038
## 4-1  3.4 -2.81695  9.61695 0.3926306
## 5-1  4.2 -2.01695 10.41695 0.2274899
## 3-2 -0.8 -7.01695  5.41695 0.9903363
## 4-2 -1.2 -7.41695  5.01695 0.9583246
## 5-2 -0.4 -6.61695  5.81695 0.9993320
## 4-3 -0.4 -6.61695  5.81695 0.9993320
## 5-3  0.4 -5.81695  6.61695 0.9993320
## 5-4  0.8 -5.41695  7.01695 0.9903363
## 
## $opera
##     diff         lwr      upr     p adj
## 2-1  7.2   0.9830497 13.41695 0.0240279
## 3-1  2.8  -3.4169503  9.01695 0.5590690
## 4-1  4.6  -1.6169503 10.81695 0.1698430
## 5-1  5.4  -0.8169503 11.61695 0.0929889
## 3-2 -4.4 -10.6169503  1.81695 0.1967853
## 4-2 -2.6  -8.8169503  3.61695 0.6195880
## 5-2 -1.8  -8.0169503  4.41695 0.8484048
## 4-3  1.8  -4.4169503  8.01695 0.8484048
## 5-3  2.6  -3.6169503  8.81695 0.6195880
## 5-4  0.8  -5.4169503  7.01695 0.9903363
## 
## $montaje
##             diff       lwr       upr     p adj
## M2-M1 -3.2000000 -9.416950  3.016950 0.4446634
## M3-M1 -2.4333333 -8.385610  3.518943 0.6374328
## M4-M1 -3.1000000 -9.694072  3.494072 0.5227762
## M5-M1  0.6000000 -5.616950  6.816950 0.9967587
## M3-M2  0.7666667 -5.185610  6.718943 0.9903021
## M4-M2  0.1000000 -6.494072  6.694072 0.9999979
## M5-M2  3.8000000 -2.416950 10.016950 0.3013038
## M4-M3 -0.6666667 -7.011815  5.678482 0.9955104
## M5-M3  3.0333333 -2.918943  8.985610 0.4532901
## M5-M4  3.7000000 -2.894072 10.294072 0.3709451
plot(tuk3)

df3<-df.residual(anova4)
cme3<-deviance(anova4)/df3
fisher3 <- LSD.test(car,forma,df3,cme3, p.adj="bonferroni", group=TRUE,main="carga");fisher3
## $statistics
##    MSerror Df Mean       CV  t.value      MSD
##   8.095833  8  0.4 711.3294 3.832519 6.896759
## 
## $parameters
##         test  p.ajusted name.t ntr alpha
##   Fisher-LSD bonferroni  forma   5  0.05
## 
## $means
##    car      std r        LCL        UCL Min Max Q25 Q50 Q75
## A  3.6 4.669047 5  0.6656909  6.5343091  -1  11   1   2   5
## B -4.8 2.167948 5 -7.7343091 -1.8656909  -8  -2  -5  -5  -4
## C -2.6 4.393177 5 -5.5343091  0.3343091  -7   4  -6  -3  -1
## D  4.8 5.403702 5  1.8656909  7.7343091  -1  13   1   5   6
## E  1.0 3.391165 5 -1.9343091  3.9343091  -3   6  -1   1   2
## 
## $comparison
## NULL
## 
## $groups
##    car groups
## D  4.8      a
## A  3.6     ab
## E  1.0    abc
## C -2.6     bc
## B -4.8      c
## 
## attr(,"class")
## [1] "group"
newman3 <- SNK.test(car,forma,df3,cme3, group=TRUE);newman3
## $statistics
##    MSerror Df Mean       CV
##   8.095833  8  0.4 711.3294
## 
## $parameters
##   test name.t ntr alpha
##    SNK  forma   5  0.05
## 
## $snk
##      Table CriticalRange
## 2 3.261182      4.149740
## 3 4.041036      5.142077
## 4 4.528810      5.762751
## 5 4.885754      6.216950
## 
## $means
##    car      std r Min Max Q25 Q50 Q75
## A  3.6 4.669047 5  -1  11   1   2   5
## B -4.8 2.167948 5  -8  -2  -5  -5  -4
## C -2.6 4.393177 5  -7   4  -6  -3  -1
## D  4.8 5.403702 5  -1  13   1   5   6
## E  1.0 3.391165 5  -3   6  -1   1   2
## 
## $comparison
## NULL
## 
## $groups
##    car groups
## D  4.8      a
## A  3.6      a
## E  1.0     ab
## C -2.6     bc
## B -4.8      c
## 
## attr(,"class")
## [1] "group"
plot(newman3)
dun3 <- duncan.test(car,forma,df3,cme3, group=TRUE);dun3
## $statistics
##    MSerror Df Mean       CV
##   8.095833  8  0.4 711.3294
## 
## $parameters
##     test name.t ntr alpha
##   Duncan  forma   5  0.05
## 
## $duncan
##      Table CriticalRange
## 2 3.261182      4.149740
## 3 3.398460      4.324421
## 4 3.475191      4.422058
## 5 3.521194      4.480595
## 
## $means
##    car      std r Min Max Q25 Q50 Q75
## A  3.6 4.669047 5  -1  11   1   2   5
## B -4.8 2.167948 5  -8  -2  -5  -5  -4
## C -2.6 4.393177 5  -7   4  -6  -3  -1
## D  4.8 5.403702 5  -1  13   1   5   6
## E  1.0 3.391165 5  -3   6  -1   1   2
## 
## $comparison
## NULL
## 
## $groups
##    car groups
## D  4.8      a
## A  3.6      a
## E  1.0     ab
## C -2.6     bc
## B -4.8      c
## 
## attr(,"class")
## [1] "group"
plot(dun3)

sch3 <- scheffe.test(car,forma,df3,cme3,group=TRUE,main="carga");sch3
## $statistics
##    MSerror Df        F Mean       CV  Scheffe CriticalDifference
##   8.095833  8 3.837853  0.4 711.3294 3.918088           7.050744
## 
## $parameters
##      test name.t ntr alpha
##   Scheffe  forma   5  0.05
## 
## $means
##    car      std r Min Max Q25 Q50 Q75
## A  3.6 4.669047 5  -1  11   1   2   5
## B -4.8 2.167948 5  -8  -2  -5  -5  -4
## C -2.6 4.393177 5  -7   4  -6  -3  -1
## D  4.8 5.403702 5  -1  13   1   5   6
## E  1.0 3.391165 5  -3   6  -1   1   2
## 
## $comparison
## NULL
## 
## $groups
##    car groups
## D  4.8      a
## A  3.6     ab
## E  1.0    abc
## C -2.6     bc
## B -4.8      c
## 
## attr(,"class")
## [1] "group"

|—|

O.M.F.

|-|-|-|