%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("h9nY-1iM0dY")
embed_youtube("bQdvpi6WZYc")
embed_youtube("F_KEL5IPS0s")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Tipos de Cuero | Desgaste | |||||
---|---|---|---|---|---|---|
A | 264 | 260 | 258 | 241 | 262 | 255 |
B | 208 | 220 | 216 | 200 | 213 | 206 |
C | 220 | 263 | 219 | 225 | 230 | 228 |
D | 217 | 226 | 215 | 224 | 220 | 222 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Datos del Problema Tipos de Cuero T.CUERO
A<-c(264, 260, 258, 241, 262, 255)
B<-c(208, 220, 216, 200, 213, 206)
C<-c(220, 263, 219, 225, 230, 228)
D<-c(217, 226, 215, 224, 220, 222)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
T.CUERO <-matrix(c(A, B, C, D),nrow = 6,ncol = 4)
T.CUERO
## [,1] [,2] [,3] [,4]
## [1,] 264 208 220 217
## [2,] 260 220 263 226
## [3,] 258 216 219 215
## [4,] 241 200 225 224
## [5,] 262 213 230 220
## [6,] 255 206 228 222
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
colnames(T.CUERO)<-c("A", "B", "C", "D")
T.CUERO
## A B C D
## [1,] 264 208 220 217
## [2,] 260 220 263 226
## [3,] 258 216 219 215
## [4,] 241 200 225 224
## [5,] 262 213 230 220
## [6,] 255 206 228 222
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rownames(T.CUERO)<-c("1","2","3","4","5","6")
T.CUERO
## A B C D
## 1 264 208 220 217
## 2 260 220 263 226
## 3 258 216 219 215
## 4 241 200 225 224
## 5 262 213 230 220
## 6 255 206 228 222
summary(T.CUERO)
## A B C D
## Min. :241.0 Min. :200.0 Min. :219.0 Min. :215.0
## 1st Qu.:255.8 1st Qu.:206.5 1st Qu.:221.2 1st Qu.:217.8
## Median :259.0 Median :210.5 Median :226.5 Median :221.0
## Mean :256.7 Mean :210.5 Mean :230.8 Mean :220.7
## 3rd Qu.:261.5 3rd Qu.:215.2 3rd Qu.:229.5 3rd Qu.:223.5
## Max. :264.0 Max. :220.0 Max. :263.0 Max. :226.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(T.CUERO, col=c("red", "blue", "yellow", "orange"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set.seed(7638)
T.CUERO2 <- factor( rep( c("A", "B", "C","D" ), each = 6))
Desgaste <- c(264, 260, 258, 241, 262, 255, 208, 220, 216, 200, 213, 206, 220, 263, 219, 225, 230, 228, 217, 226, 215, 224, 220, 222)
DCA <- data.frame( T.CUERO2, Desgaste )
DCA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(DCA, f=TRUE)
## T.CUERO2 Desgaste
## A:6 Min. :200.0
## B:6 1st Qu.:216.8
## C:6 Median :223.0
## D:6 Mean :229.7
## 3rd Qu.:244.5
## Max. :264.0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(Desgaste ~ T.CUERO2, data=DCA, col=c("red", "blue", "yellow", "orange"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\[lm: y_{ij} = \mu+\tau_i+\epsilon_{ij}= \mu_i+\epsilon_{ij}\] donde \(\mu\) es la media real del desgaste con los diferentes tipos de cuero, \(\tau_i\) es el efecto medio sobre el desgaste de los tipos de cuero y \(\epsilon_ij\) es el arror aleatorio
g <- lm(Desgaste ~ T.CUERO2, data=DCA)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(g)
##
## Call:
## lm(formula = Desgaste ~ T.CUERO2, data = DCA)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15.667 -4.792 -0.750 3.833 32.167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 256.667 4.112 62.419 < 2e-16 ***
## T.CUERO2B -46.167 5.815 -7.939 1.31e-07 ***
## T.CUERO2C -25.833 5.815 -4.442 0.00025 ***
## T.CUERO2D -36.000 5.815 -6.191 4.78e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.07 on 20 degrees of freedom
## Multiple R-squared: 0.7771, Adjusted R-squared: 0.7436
## F-statistic: 23.24 on 3 and 20 DF, p-value: 1.002e-06
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
anova(g)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
model.matrix(g)
## (Intercept) T.CUERO2B T.CUERO2C T.CUERO2D
## 1 1 0 0 0
## 2 1 0 0 0
## 3 1 0 0 0
## 4 1 0 0 0
## 5 1 0 0 0
## 6 1 0 0 0
## 7 1 1 0 0
## 8 1 1 0 0
## 9 1 1 0 0
## 10 1 1 0 0
## 11 1 1 0 0
## 12 1 1 0 0
## 13 1 0 1 0
## 14 1 0 1 0
## 15 1 0 1 0
## 16 1 0 1 0
## 17 1 0 1 0
## 18 1 0 1 0
## 19 1 0 0 1
## 20 1 0 0 1
## 21 1 0 0 1
## 22 1 0 0 1
## 23 1 0 0 1
## 24 1 0 0 1
## attr(,"assign")
## [1] 0 1 1 1
## attr(,"contrasts")
## attr(,"contrasts")$T.CUERO2
## [1] "contr.treatment"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gi <- lm(Desgaste ~ T.CUERO2 -1, data=DCA)
model.matrix(gi)
## T.CUERO2A T.CUERO2B T.CUERO2C T.CUERO2D
## 1 1 0 0 0
## 2 1 0 0 0
## 3 1 0 0 0
## 4 1 0 0 0
## 5 1 0 0 0
## 6 1 0 0 0
## 7 0 1 0 0
## 8 0 1 0 0
## 9 0 1 0 0
## 10 0 1 0 0
## 11 0 1 0 0
## 12 0 1 0 0
## 13 0 0 1 0
## 14 0 0 1 0
## 15 0 0 1 0
## 16 0 0 1 0
## 17 0 0 1 0
## 18 0 0 1 0
## 19 0 0 0 1
## 20 0 0 0 1
## 21 0 0 0 1
## 22 0 0 0 1
## 23 0 0 0 1
## 24 0 0 0 1
## attr(,"assign")
## [1] 1 1 1 1
## attr(,"contrasts")
## attr(,"contrasts")$T.CUERO2
## [1] "contr.treatment"
summary(gi)
##
## Call:
## lm(formula = Desgaste ~ T.CUERO2 - 1, data = DCA)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15.667 -4.792 -0.750 3.833 32.167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## T.CUERO2A 256.667 4.112 62.42 <2e-16 ***
## T.CUERO2B 210.500 4.112 51.19 <2e-16 ***
## T.CUERO2C 230.833 4.112 56.14 <2e-16 ***
## T.CUERO2D 220.667 4.112 53.66 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.07 on 20 degrees of freedom
## Multiple R-squared: 0.9984, Adjusted R-squared: 0.9981
## F-statistic: 3137 on 4 and 20 DF, p-value: < 2.2e-16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
names(g)
## [1] "coefficients" "residuals" "effects" "rank"
## [5] "fitted.values" "assign" "qr" "df.residual"
## [9] "contrasts" "xlevels" "call" "terms"
## [13] "model"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
qqnorm(g$res, main = "Distribución de residuos para la variable Desgaste",col="red", lwd=3)
qqline(g$res, col="blue", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mean(g$res)
## [1] 3.330669e-16
sd(g$res)
## [1] 9.392411
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g$res
## 1 2 3 4 5 6
## 7.3333333 3.3333333 1.3333333 -15.6666667 5.3333333 -1.6666667
## 7 8 9 10 11 12
## -2.5000000 9.5000000 5.5000000 -10.5000000 2.5000000 -4.5000000
## 13 14 15 16 17 18
## -10.8333333 32.1666667 -11.8333333 -5.8333333 -0.8333333 -2.8333333
## 19 20 21 22 23 24
## -3.6666667 5.3333333 -5.6666667 3.3333333 -0.6666667 1.3333333
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(g$fit,g$res,xlab="Predichos",ylab="Residuos",
main="GrƔfico Residuos-Predichos", col="blue", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(jitter(g$fit),g$res,xlab="Predichos",ylab="Residuos",
main="Jittered plot", col="blue", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g <- lm(Desgaste ~ T.CUERO2, data=DCA)
summary(g)
##
## Call:
## lm(formula = Desgaste ~ T.CUERO2, data = DCA)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15.667 -4.792 -0.750 3.833 32.167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 256.667 4.112 62.419 < 2e-16 ***
## T.CUERO2B -46.167 5.815 -7.939 1.31e-07 ***
## T.CUERO2C -25.833 5.815 -4.442 0.00025 ***
## T.CUERO2D -36.000 5.815 -6.191 4.78e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.07 on 20 degrees of freedom
## Multiple R-squared: 0.7771, Adjusted R-squared: 0.7436
## F-statistic: 23.24 on 3 and 20 DF, p-value: 1.002e-06
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DCA$T.CUERO2 <- relevel(DCA$T.CUERO2,ref="B")
g <- lm(Desgaste ~ T.CUERO2, data=DCA)
summary(g)
##
## Call:
## lm(formula = Desgaste ~ T.CUERO2, data = DCA)
##
## Residuals:
## Min 1Q Median 3Q Max
## -15.667 -4.792 -0.750 3.833 32.167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 210.500 4.112 51.192 < 2e-16 ***
## T.CUERO2A 46.167 5.815 7.939 1.31e-07 ***
## T.CUERO2C 20.333 5.815 3.497 0.00227 **
## T.CUERO2D 10.167 5.815 1.748 0.09575 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 10.07 on 20 degrees of freedom
## Multiple R-squared: 0.7771, Adjusted R-squared: 0.7436
## F-statistic: 23.24 on 3 and 20 DF, p-value: 1.002e-06
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
anova(g)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
z = TukeyHSD(aov(Desgaste ~ T.CUERO2, data=DCA))
z
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = Desgaste ~ T.CUERO2, data = DCA)
##
## $T.CUERO2
## diff lwr upr p adj
## A-B 46.16667 29.890265 62.443068 0.0000007
## C-B 20.33333 4.056932 36.609735 0.0112174
## D-B 10.16667 -6.109735 26.443068 0.3263417
## C-A -25.83333 -42.109735 -9.556932 0.0013189
## D-A -36.00000 -52.276401 -19.723599 0.0000265
## D-C -10.16667 -26.443068 6.109735 0.3263417
plot(z)
El método de Tukey supone lo peor centrÔndose en la diferencia mÔs grande. Hay otros competidores como el Newman-Keuls, el rango múltiple de Duncan y el procedimiento de Waller-Duncan. Para una descripción detallada de las muchas alternativas disponibles ver Hsu (1996).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(lm( abs(g$res) ~ DCA$T.CUERO2))
##
## Call:
## lm(formula = abs(g$res) ~ DCA$T.CUERO2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.8889 -3.3333 -0.3889 1.6667 21.4444
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.83333 2.68960 2.169 0.0423 *
## DCA$T.CUERO2A -0.05556 3.80367 -0.015 0.9885
## DCA$T.CUERO2C 4.88889 3.80367 1.285 0.2134
## DCA$T.CUERO2D -2.50000 3.80367 -0.657 0.5185
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.588 on 20 degrees of freedom
## Multiple R-squared: 0.166, Adjusted R-squared: 0.04088
## F-statistic: 1.327 on 3 and 20 DF, p-value: 0.2936
Dado que el valor p es grande, concluimos que no hay evidencia de una varianza no constante.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("--GzYcmlk5o")
Tratamientos | A | B | C | D | ||
---|---|---|---|---|---|---|
I | 4.1 | 6.5 | 4.1 | 4.9 | ||
II | 4.1 | 5.3 | 4.0 | 6.2 | ||
Bloques | III | 6.5 | 6.9 | 4.5 | 4.8 | |
IV | 4.3 | 6.8 | 4.3 | 4.2 | ||
V | 6.0 | 6.5 | 4.1 | 6.9 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
V.sanguĆneo =c(4.1, 6.5,4.1, 4.9,
4.1, 5.3, 4.0, 6.2,
6.5, 6.9, 4.5, 4.8,
4.3, 6.8, 4.3,4.2,
6.0, 6.5,4.1, 6.9)
Tratamientos =factor( c(rep("A",1),
rep("B",1),
rep("C",1),
rep("D",1)))
Bloques = factor(c(rep("I",4),
rep("II",4),
rep("III",4),
rep("IV",4),
rep("V",4)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBCA1 = data.frame(Bloques,Tratamientos, V.sanguĆneo)
DBCA1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(gridExtra)
library(ggplot2)
## Warning: replacing previous import 'ellipsis::check_dots_unnamed' by
## 'rlang::check_dots_unnamed' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_used' by
## 'rlang::check_dots_used' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_empty' by
## 'rlang::check_dots_empty' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_unnamed' by
## 'rlang::check_dots_unnamed' when loading 'pillar'
## Warning: replacing previous import 'ellipsis::check_dots_used' by
## 'rlang::check_dots_used' when loading 'pillar'
## Warning: replacing previous import 'ellipsis::check_dots_empty' by
## 'rlang::check_dots_empty' when loading 'pillar'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Tratamientos2 <- ggplot(DBCA1, aes(x = Tratamientos, y = V.sanguĆneo, fill=Tratamientos)) +
geom_boxplot() + theme(legend.position = "none")
Bloques2 <- ggplot(DBCA1, aes(x = Bloques, y = V.sanguĆneo, fill=Bloques)) +
geom_boxplot() + theme(legend.position = "none")
grid.arrange(Tratamientos2,Bloques2, nrow=1, ncol=2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
modeloDBCA1= lm(V.sanguĆneo ~ Tratamientos + Bloques, DBCA1)
anovaDBCA1=aov(modeloDBCA1)
anovaDBCA1
## Call:
## aov(formula = modeloDBCA1)
##
## Terms:
## Tratamientos Bloques Residuals
## Sum of Squares 12.550 3.755 8.345
## Deg. of Freedom 3 4 12
##
## Residual standard error: 0.8339165
## Estimated effects may be unbalanced
summary(anovaDBCA1)
## Df Sum Sq Mean Sq F value Pr(>F)
## Tratamientos 3 12.550 4.183 6.016 0.00964 **
## Bloques 4 3.755 0.939 1.350 0.30797
## Residuals 12 8.345 0.695
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(anovaDBCA1)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = modeloDBCA1)
##
## $Tratamientos
## diff lwr upr p adj
## B-A 1.4 -0.1658432 2.9658432 0.0854565
## C-A -0.8 -2.3658432 0.7658432 0.4580868
## D-A 0.4 -1.1658432 1.9658432 0.8713824
## C-B -2.2 -3.7658432 -0.6341568 0.0061420
## D-B -1.0 -2.5658432 0.5658432 0.2800111
## D-C 1.2 -0.3658432 2.7658432 0.1586223
##
## $Bloques
## diff lwr upr p adj
## II-I 0.000000e+00 -1.8795268 1.879527 1.0000000
## III-I 7.750000e-01 -1.1045268 2.654527 0.6881671
## IV-I -8.881784e-16 -1.8795268 1.879527 1.0000000
## V-I 9.750000e-01 -0.9045268 2.854527 0.4944147
## III-II 7.750000e-01 -1.1045268 2.654527 0.6881671
## IV-II -8.881784e-16 -1.8795268 1.879527 1.0000000
## V-II 9.750000e-01 -0.9045268 2.854527 0.4944147
## IV-III -7.750000e-01 -2.6545268 1.104527 0.6881671
## V-III 2.000000e-01 -1.6795268 2.079527 0.9967411
## V-IV 9.750000e-01 -0.9045268 2.854527 0.4944147
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(TukeyHSD(anovaDBCA1))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(agricolae)
## Warning: replacing previous import 'ellipsis::check_dots_unnamed' by
## 'rlang::check_dots_unnamed' when loading 'hms'
## Warning: replacing previous import 'ellipsis::check_dots_used' by
## 'rlang::check_dots_used' when loading 'hms'
## Warning: replacing previous import 'ellipsis::check_dots_empty' by
## 'rlang::check_dots_empty' when loading 'hms'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1,"Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.149139
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 bc
## C 4.2 c
plot(LSD.test(anovaDBCA1,"Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.149139
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 bc
## C 4.2 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1,"Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## I 4.900 1.131371 4 3.991526 5.808474 4.1 6.5
## II 4.900 1.048809 4 3.991526 5.808474 4.0 6.2
## III 5.675 1.201041 4 4.766526 6.583474 4.5 6.9
## IV 4.900 1.267544 4 3.991526 5.808474 4.2 6.8
## V 5.875 1.239287 4 4.966526 6.783474 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.284776
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
plot(LSD.test(anovaDBCA1,"Bloques",console=TRUE))
##
## Study: anovaDBCA1 ~ "Bloques"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## I 4.900 1.131371 4 3.991526 5.808474 4.1 6.5
## II 4.900 1.048809 4 3.991526 5.808474 4.0 6.2
## III 5.675 1.201041 4 4.766526 6.583474 4.5 6.9
## IV 4.900 1.267544 4 3.991526 5.808474 4.2 6.8
## V 5.875 1.239287 4 4.966526 6.783474 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.284776
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.19866
##
## Minimun Significant Difference: 1.565843
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(HSD.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.19866
##
## Minimun Significant Difference: 1.565843
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBCA1, "Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.50771
##
## Minimun Significant Difference: 1.879527
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SNK.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Student Newman Keuls Test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.407072 1.565843
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(SNK.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Student Newman Keuls Test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.407072 1.565843
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
scheffe.test(anovaDBCA1, "Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## Scheffe Test for V.sanguĆneo
##
## Mean Square Error : 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of F: 3.259167
##
## Minimum Significant Difference: 2.129074
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
plot(scheffe.test(anovaDBCA1, "Bloques",console=TRUE))
##
## Study: anovaDBCA1 ~ "Bloques"
##
## Scheffe Test for V.sanguĆneo
##
## Mean Square Error : 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of F: 3.259167
##
## Minimum Significant Difference: 2.129074
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
duncan.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Duncan's new multiple range test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.202818 1.235342
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 b
## C 4.2 b
plot(duncan.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Duncan's new multiple range test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.202818 1.235342
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 b
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1, "Tratamientos", p.adj= "bon",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 3.152681
##
## Minimum Significant Difference: 1.662772
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(LSD.test(anovaDBCA1, "Tratamientos", p.adj= "bon",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 3.152681
##
## Minimum Significant Difference: 1.662772
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
shapiro.test(anovaDBCA1$res)
##
## Shapiro-Wilk normality test
##
## data: anovaDBCA1$res
## W = 0.95529, p-value = 0.4545
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(anovaDBCA1$residuals)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -1.025 -0.550 -0.025 0.000 0.450 1.150
sd((anovaDBCA1$residuals))
## [1] 0.6627296
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaDBCA1$residuals,col="lightblue")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hist(anovaDBCA1$residuals, col="lightgreen", main = "Histograma de los Residuos",
freq = F, xlab="Residuos",ylab="Densidad")
lines(density(anovaDBCA1$residuals), col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
qqnorm(anovaDBCA1$residuals,col="blue", lwd=3)
qqline(anovaDBCA1$residuals,col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 3.7. Supuestos del Modelo en RStudio: Supuesto de Independencia
plot(anovaDBCA1$residuals,main = "Residuos vs Observaciones",col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 3.8. Supuestos del Modelo en RStudio: Supuesto de Homocedasticidad
boxplot(anovaDBCA1$residuals~Bloques, xlab="Bloques",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red"))
names(anovaDBCA1)
## [1] "coefficients" "residuals" "effects" "rank"
## [5] "fitted.values" "assign" "qr" "df.residual"
## [9] "contrasts" "xlevels" "call" "terms"
## [13] "model"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pred=fitted(anovaDBCA1)
resid=rstandard(anovaDBCA1)
plot(pred,resid,xlab="Valores predichos", ylab="Residuos estandarizados",abline(h=0),col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaDBCA1$residuals ~ Bloques)
##
## Bartlett test of homogeneity of variances
##
## data: anovaDBCA1$residuals by Bloques
## Bartlett's K-squared = 1.2802, df = 4, p-value = 0.8647
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("-7Yh4KTkDoo")
Razas Ā Patologias | 1:Isquemia | 2:Tumor | 3:Hepatitis | 4:Hemocromatosis |
---|---|---|---|---|
1:Cocker | A=10 | B=9 | C=25 | D=8 |
2:Pastor | D=9 | A=5 | B=17 | C=26 |
3:Boxer | C=24 | D=9 | A=8 | B=19 |
4:Schnauzer | B=20 | C=22 | D=8 | A=5 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set.seed(7638)
PATOLOGIAS <- factor( rep( c("P1", "P2", "P3","P4" ), each = 1))
RAZAS <- factor( rep( c("R1", "R2", "R3", "R4" ), each = 4))
VITAMINAS <- factor(c("A", "B", "C","D","D", "A", "B", "C","C", "D", "A", "B", "B", "C", "D", "A" ))
f = TGP <- c(10, 9, 25, 8, 9, 5, 17, 26, 24, 9, 8, 19, 20, 22, 8 ,5)
DCL <- data.frame( RAZAS, PATOLOGIAS, VITAMINAS, f)
DCL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
####Niveles del Factor: A, B, C y D (cuatro niveles I=4).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(f ~RAZAS + PATOLOGIAS +VITAMINAS, data=DCL, col=c("red2", "blue2", "yellow2", "orange2"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g <- lm(f ~RAZAS + PATOLOGIAS +VITAMINAS, data=DCL)
summary(g)
##
## Call:
## lm(formula = f ~ RAZAS + PATOLOGIAS + VITAMINAS, data = DCL)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5000 -0.9375 0.2500 1.2500 2.2500
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.750 2.271 3.413 0.014266 *
## RAZASR2 1.250 2.031 0.615 0.560856
## RAZASR3 2.000 2.031 0.985 0.362784
## RAZASR4 0.750 2.031 0.369 0.724605
## PATOLOGIASP2 -4.500 2.031 -2.216 0.068608 .
## PATOLOGIASP3 -1.250 2.031 -0.615 0.560856
## PATOLOGIASP4 -1.250 2.031 -0.615 0.560856
## VITAMINASB 9.250 2.031 4.554 0.003874 **
## VITAMINASC 17.250 2.031 8.493 0.000146 ***
## VITAMINASD 1.500 2.031 0.739 0.488053
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.872 on 6 degrees of freedom
## Multiple R-squared: 0.9424, Adjusted R-squared: 0.8561
## F-statistic: 10.92 on 9 and 6 DF, p-value: 0.004384
anova(g)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g2<-aov(f ~RAZAS + PATOLOGIAS +VITAMINAS, data=DCL)
g2
## Call:
## aov(formula = f ~ RAZAS + PATOLOGIAS + VITAMINAS, data = DCL)
##
## Terms:
## RAZAS PATOLOGIAS VITAMINAS Residuals
## Sum of Squares 8.5 44.5 757.5 49.5
## Deg. of Freedom 3 3 3 6
##
## Residual standard error: 2.872281
## Estimated effects may be unbalanced
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(g2)
## Df Sum Sq Mean Sq F value Pr(>F)
## RAZAS 3 8.5 2.83 0.343 0.795455
## PATOLOGIAS 3 44.5 14.83 1.798 0.247633
## VITAMINAS 3 757.5 252.50 30.606 0.000493 ***
## Residuals 6 49.5 8.25
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(g2)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ RAZAS + PATOLOGIAS + VITAMINAS, data = DCL)
##
## $RAZAS
## diff lwr upr p adj
## R2-R1 1.25 -5.780769 8.280769 0.9234780
## R3-R1 2.00 -5.030769 9.030769 0.7632815
## R4-R1 0.75 -6.280769 7.780769 0.9812251
## R3-R2 0.75 -6.280769 7.780769 0.9812251
## R4-R2 -0.50 -7.530769 6.530769 0.9942013
## R4-R3 -1.25 -8.280769 5.780769 0.9234780
##
## $PATOLOGIAS
## diff lwr upr p adj
## P2-P1 -4.500000e+00 -11.530769 2.530769 0.221112
## P3-P1 -1.250000e+00 -8.280769 5.780769 0.923478
## P4-P1 -1.250000e+00 -8.280769 5.780769 0.923478
## P3-P2 3.250000e+00 -3.780769 10.280769 0.443965
## P4-P2 3.250000e+00 -3.780769 10.280769 0.443965
## P4-P3 1.776357e-15 -7.030769 7.030769 1.000000
##
## $VITAMINAS
## diff lwr upr p adj
## B-A 9.25 2.2192309 16.2807691 0.0151908
## C-A 17.25 10.2192309 24.2807691 0.0006054
## D-A 1.50 -5.5307691 8.5307691 0.8783266
## C-B 8.00 0.9692309 15.0307691 0.0291977
## D-B -7.75 -14.7807691 -0.7192309 0.0334590
## D-C -15.75 -22.7807691 -8.7192309 0.0009991
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(TukeyHSD(g2))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
par( mfrow = c(2,2) )
plot(g2, which=5)
plot(g2, which=1)
plot(g2, which=2)
plot(residuals(g2) ~ f, main="Residuals vs corridas", font.main=1, DCL)
abline(h = 0, lty = 2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(lm( abs(g$res) ~DCL$PATOLOGIAS))
##
## Call:
## lm(formula = abs(g$res) ~ DCL$PATOLOGIAS)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.2500 -0.6562 0.0000 0.5312 1.7500
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.2500 0.4649 4.840 0.000405 ***
## DCL$PATOLOGIASP2 -0.5000 0.6575 -0.760 0.461656
## DCL$PATOLOGIASP3 -1.6250 0.6575 -2.472 0.029411 *
## DCL$PATOLOGIASP4 -1.1250 0.6575 -1.711 0.112772
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9298 on 12 degrees of freedom
## Multiple R-squared: 0.3688, Adjusted R-squared: 0.211
## F-statistic: 2.337 on 3 and 12 DF, p-value: 0.1252
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("H9MfiJVrDK0")
Cows Ā Period | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
1 | 304 | 436 | 350 | 504 | 417 | 519 | 432 |
(A\(\alpha\)) | (B\(\epsilon\)) | (C\(\beta\)) | (D\(\phi\)) | (E\(\chi\)) | (F\(\gamma\)) | (G\(\delta\)) | |
2 | 381 | 505 | 425 | 564 | 494 | 350 | 413 |
(B\(\beta\)) | (C\(\phi\)) | (D\(\chi\)) | (E\(\gamma\)) | (F\(\delta\)) | (G\(\alpha\)) | (A\(\epsilon\)) | |
3 | 432 | 566 | 479 | 357 | 461 | 340 | 502 |
(C\(\chi\)) | (D\(\gamma\)) | (E\(\delta\)) | (F\(\alpha\)) | (G\(\epsilon\)) | (A\(\beta\)) | (B\(\phi\)) | |
4 | 442 | 372 | 536 | 366 | 495 | 425 | 507 |
(D\(\delta\)) | (E\(\alpha\)) | (F\(\epsilon\)) | (G\(\beta\)) | (A\(\phi\)) | (B\(\chi\)) | (C\(\gamma\)) | |
5 | 496 | 449 | 493 | 345 | 509 | 481 | 380 |
(E\(\epsilon\)) | (F\(\beta\)) | (G\(\phi\)) | (A\(\chi\)) | (B\(\gamma\)) | (C\(\delta\)) | (D\(\alpha\)) | |
6 | 534 | 421 | 452 | 427 | 346 | 478 | 397 |
(F\(\phi\)) | (G\(\chi\)) | (A\(\gamma\)) | (B\(\delta\)) | (C\(\alpha\)) | (D\(\epsilon\)) | (E\(\beta\)) | |
7 | 543 | 386 | 435 | 485 | 406 | 554 | 410 |
(G\(\gamma\)) | (A\(\delta\)) | (B\(\alpha\)) | (C\(\epsilon\)) | (D\(\beta\)) | (E\(\phi\)) | (F\(\chi\)) |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 5.3 Ingresando los datos en RStudio
Lisina = factor(c("A","B","C","D","E","F","G",
"B","C","D","E","F","G","A",
"C","D","E","F","G","A","B",
"D","E","F","G","A","B","C",
"E","F","G","A","B","C","D",
"F","G","A","B","C","D", "E",
"G","A","B","C","D", "E","F"))
Producción =c(304, 381, 432, 442, 496, 534, 543,
436, 505, 566, 372, 449, 421, 386,
350, 425, 479, 536, 493, 452, 435,
504, 564, 357, 366, 345, 427, 485,
417, 494, 461, 495, 509, 346, 406,
519, 350, 340, 425, 481, 478, 554,
432, 413, 502, 507, 380, 397, 410)
Vaca =factor( c(rep("1",1),
rep("2",1),
rep("3",1),
rep("4",1),
rep("5",1),
rep("6",1),
rep("7",1)))
Periodo = factor(c(rep("1",7),
rep("2",7),
rep("3",7),
rep("4",7),
rep("5",7),
rep("6",7),
rep("7",7)))
ProteĆna =factor(c("a","b","c","d","e", "f", "g",
"e","f","g","a","b", "c", "d",
"b","c","d","e","f", "g", "a",
"f", "g", "a","b","c","d","e",
"c","d","e", "f", "g","a","b",
"g","a","b","c","d","e", "f",
"d","e", "f", "g","a","b","c"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dataGreco = data.frame(Vaca,Periodo, Lisina, ProteĆna, Producción)
dataGreco
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(gridExtra)
library(ggplot2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Lisina2 <- ggplot(dataGreco, aes(x = Lisina, y = Producción, fill=Lisina)) +
geom_boxplot() + theme(legend.position = "none")
ProteĆna2 <- ggplot(dataGreco, aes(x = ProteĆna, y = Producción, fill=ProteĆna)) +
geom_boxplot() + theme(legend.position = "none")
Vaca2 <- ggplot(dataGreco, aes(x = Vaca, y = Producción, fill=Vaca)) +
geom_boxplot() + theme(legend.position = "none")
Periodo2 <- ggplot(dataGreco, aes(x = Periodo, y = Producción, fill=Periodo)) +
geom_boxplot() + theme(legend.position = "none")
grid.arrange(Lisina2,ProteĆna2,Vaca2,Periodo2, nrow=2,ncol=2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
modeloGreco= lm(Producción ~ Lisina + Vaca + Periodo + ProteĆna, dataGreco)
anovaGreco=aov(modeloGreco)
anovaGreco
## Call:
## aov(formula = modeloGreco)
##
## Terms:
## Lisina Vaca Periodo ProteĆna Residuals
## Sum of Squares 30718.24 5831.96 2124.24 160242.82 15544.41
## Deg. of Freedom 6 6 6 6 24
##
## Residual standard error: 25.44963
## Estimated effects may be unbalanced
summary(anovaGreco)
## Df Sum Sq Mean Sq F value Pr(>F)
## Lisina 6 30718 5120 7.905 8.98e-05 ***
## Vaca 6 5832 972 1.501 0.220
## Periodo 6 2124 354 0.547 0.768
## ProteĆna 6 160243 26707 41.235 1.75e-11 ***
## Residuals 24 15544 648
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(anovaGreco)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = modeloGreco)
##
## $Lisina
## diff lwr upr p adj
## B-A 54.285714 10.602565 97.96886 0.0084334
## C-A 53.000000 9.316850 96.68315 0.0105520
## D-A 66.571429 22.888279 110.25458 0.0009375
## E-A 77.714286 34.031136 121.39744 0.0001255
## F-A 80.571429 36.888279 124.25458 0.0000753
## G-A 47.285714 3.602565 90.96886 0.0278698
## C-B -1.285714 -44.968864 42.39744 0.9999999
## D-B 12.285714 -31.397435 55.96886 0.9685039
## E-B 23.428571 -20.254578 67.11172 0.6087189
## F-B 26.285714 -17.397435 69.96886 0.4798768
## G-B -7.000000 -50.683150 36.68315 0.9983751
## D-C 13.571429 -30.111721 57.25458 0.9496240
## E-C 24.714286 -18.968864 68.39744 0.5501792
## F-C 27.571429 -16.111721 71.25458 0.4246848
## G-C -5.714286 -49.397435 37.96886 0.9994849
## E-D 11.142857 -32.540293 54.82601 0.9805282
## F-D 14.000000 -29.683150 57.68315 0.9419417
## G-D -19.285714 -62.968864 24.39744 0.7872452
## F-E 2.857143 -40.826007 46.54029 0.9999911
## G-E -30.428571 -74.111721 13.25458 0.3137926
## G-F -33.285714 -76.968864 10.39744 0.2230055
##
## $Vaca
## diff lwr upr p adj
## 2-1 24.2857143 -19.397435 67.96886 0.5696607
## 3-1 25.0000000 -18.683150 68.68315 0.5372409
## 4-1 25.8571429 -17.826007 69.54029 0.4988057
## 5-1 27.2857143 -16.397435 70.96886 0.4367144
## 6-1 13.2857143 -30.397435 56.96886 0.9543493
## 7-1 36.7142857 -6.968864 80.39744 0.1415911
## 3-2 0.7142857 -42.968864 44.39744 1.0000000
## 4-2 1.5714286 -42.111721 45.25458 0.9999997
## 5-2 3.0000000 -40.683150 46.68315 0.9999881
## 6-2 -11.0000000 -54.683150 32.68315 0.9817515
## 7-2 12.4285714 -31.254578 56.11172 0.9667006
## 4-3 0.8571429 -42.826007 44.54029 1.0000000
## 5-3 2.2857143 -41.397435 45.96886 0.9999976
## 6-3 -11.7142857 -55.397435 31.96886 0.9750321
## 7-3 11.7142857 -31.968864 55.39744 0.9750321
## 5-4 1.4285714 -42.254578 45.11172 0.9999999
## 6-4 -12.5714286 -56.254578 31.11172 0.9648262
## 7-4 10.8571429 -32.826007 54.54029 0.9829176
## 6-5 -14.0000000 -57.683150 29.68315 0.9419417
## 7-5 9.4285714 -34.254578 53.11172 0.9917682
## 7-6 23.4285714 -20.254578 67.11172 0.6087189
##
## $Periodo
## diff lwr upr p adj
## 2-1 0.4285714 -43.25458 44.11172 1.0000000
## 3-1 5.4285714 -38.25458 49.11172 0.9996162
## 4-1 -12.0000000 -55.68315 31.68315 0.9719025
## 5-1 -0.5714286 -44.25458 43.11172 1.0000000
## 6-1 2.1428571 -41.54029 45.82601 0.9999984
## 7-1 -13.0000000 -56.68315 30.68315 0.9587653
## 3-2 5.0000000 -38.68315 48.68315 0.9997612
## 4-2 -12.4285714 -56.11172 31.25458 0.9667006
## 5-2 -1.0000000 -44.68315 42.68315 1.0000000
## 6-2 1.7142857 -41.96886 45.39744 0.9999996
## 7-2 -13.4285714 -57.11172 30.25458 0.9520258
## 4-3 -17.4285714 -61.11172 26.25458 0.8537421
## 5-3 -6.0000000 -49.68315 37.68315 0.9993194
## 6-3 -3.2857143 -46.96886 40.39744 0.9999796
## 7-3 -18.4285714 -62.11172 25.25458 0.8193780
## 5-4 11.4285714 -32.25458 55.11172 0.9779036
## 6-4 14.1428571 -29.54029 57.82601 0.9392195
## 7-4 -1.0000000 -44.68315 42.68315 1.0000000
## 6-5 2.7142857 -40.96886 46.39744 0.9999934
## 7-5 -12.4285714 -56.11172 31.25458 0.9667006
## 7-6 -15.1428571 -58.82601 28.54029 0.9178534
##
## $ProteĆna
## diff lwr upr p adj
## b-a 20.71429 -22.968864 64.39744 0.7291166
## c-a 47.28571 3.602565 90.96886 0.0278698
## d-a 85.28571 41.602565 128.96886 0.0000326
## e-a 108.71429 65.031136 152.39744 0.0000006
## f-a 149.00000 105.316850 192.68315 0.0000000
## g-a 159.42857 115.745422 203.11172 0.0000000
## c-b 26.57143 -17.111721 70.25458 0.4673904
## d-b 64.57143 20.888279 108.25458 0.0013458
## e-b 88.00000 44.316850 131.68315 0.0000203
## f-b 128.28571 84.602565 171.96886 0.0000000
## g-b 138.71429 95.031136 182.39744 0.0000000
## d-c 38.00000 -5.683150 81.68315 0.1181175
## e-c 61.42857 17.745422 105.11172 0.0023709
## f-c 101.71429 58.031136 145.39744 0.0000020
## g-c 112.14286 68.459707 155.82601 0.0000004
## e-d 23.42857 -20.254578 67.11172 0.6087189
## f-d 63.71429 20.031136 107.39744 0.0015710
## g-d 74.14286 30.459707 117.82601 0.0002385
## f-e 40.28571 -3.397435 83.96886 0.0844845
## g-e 50.71429 7.031136 94.39744 0.0156454
## g-f 10.42857 -33.254578 54.11172 0.9860875
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(TukeyHSD(anovaGreco))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(agricolae)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaGreco,"Lisina",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## LSD t Test for Producción
##
## Mean Square Error: 647.6837
##
## Lisina, means and individual ( 95 %) CI
##
## Producción std r LCL UCL Min Max
## A 390.7143 67.49250 7 370.8615 410.5670 304 495
## B 445.0000 45.36151 7 425.1472 464.8528 381 509
## C 443.7143 69.90878 7 423.8615 463.5670 346 507
## D 457.2857 63.65196 7 437.4330 477.1385 380 566
## E 468.4286 75.68984 7 448.5758 488.2813 372 564
## F 471.2857 68.58988 7 451.4330 491.1385 357 536
## G 438.0000 68.10776 7 418.1472 457.8528 350 543
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of t: 2.063899
##
## least Significant Difference: 28.07604
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 a
## D 457.2857 ab
## B 445.0000 ab
## C 443.7143 ab
## G 438.0000 b
## A 390.7143 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaGreco,"ProteĆna",console=TRUE)
##
## Study: anovaGreco ~ "ProteĆna"
##
## LSD t Test for Producción
##
## Mean Square Error: 647.6837
##
## ProteĆna, means and individual ( 95 %) CI
##
## Producción std r LCL UCL Min Max
## a 363.4286 39.84912 7 343.5758 383.2813 304 435
## b 384.1429 37.19959 7 364.2901 403.9956 340 449
## c 410.7143 29.79214 7 390.8615 430.5670 345 432
## d 448.7143 38.16506 7 428.8615 468.5670 386 494
## e 472.1429 40.36264 7 452.2901 491.9956 413 536
## f 512.4286 22.76589 7 492.5758 532.2813 493 554
## g 522.8571 39.66286 7 503.0044 542.7099 452 566
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of t: 2.063899
##
## least Significant Difference: 28.07604
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## g 522.8571 a
## f 512.4286 a
## e 472.1429 b
## d 448.7143 b
## c 410.7143 c
## b 384.1429 cd
## a 363.4286 d
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaGreco,"Vaca",console=TRUE)
##
## Study: anovaGreco ~ "Vaca"
##
## LSD t Test for Producción
##
## Mean Square Error: 647.6837
##
## Vaca, means and individual ( 95 %) CI
##
## Producción std r LCL UCL Min Max
## 1 423.1429 76.97711 7 403.2901 442.9956 304 519
## 2 447.4286 76.01065 7 427.5758 467.2813 350 564
## 3 448.1429 79.76095 7 428.2901 467.9956 340 566
## 4 449.0000 66.44797 7 429.1472 468.8528 366 536
## 5 450.4286 63.68113 7 430.5758 470.2813 345 509
## 6 436.4286 59.93012 7 416.5758 456.2813 346 534
## 7 459.8571 68.15039 7 440.0044 479.7099 386 554
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of t: 2.063899
##
## least Significant Difference: 28.07604
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## 7 459.8571 a
## 5 450.4286 ab
## 4 449.0000 ab
## 3 448.1429 ab
## 2 447.4286 ab
## 6 436.4286 ab
## 1 423.1429 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaGreco,"Periodo",console=TRUE)
##
## Study: anovaGreco ~ "Periodo"
##
## LSD t Test for Producción
##
## Mean Square Error: 647.6837
##
## Periodo, means and individual ( 95 %) CI
##
## Producción std r LCL UCL Min Max
## 1 447.4286 85.86784 7 427.5758 467.2813 304 543
## 2 447.8571 67.90540 7 428.0044 467.7099 372 566
## 3 452.8571 58.99556 7 433.0044 472.7099 350 536
## 4 435.4286 84.56725 7 415.5758 455.2813 345 564
## 5 446.8571 59.63061 7 427.0044 466.7099 346 509
## 6 449.5714 81.69630 7 429.7187 469.4242 340 554
## 7 434.4286 50.42769 7 414.5758 454.2813 380 507
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of t: 2.063899
##
## least Significant Difference: 28.07604
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## 3 452.8571 a
## 6 449.5714 a
## 2 447.8571 a
## 1 447.4286 a
## 5 446.8571 a
## 4 435.4286 a
## 7 434.4286 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaGreco, "Lisina",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## HSD Test for Producción
##
## Mean Square Error: 647.6837
##
## Lisina, means
##
## Producción std r Min Max
## A 390.7143 67.49250 7 304 495
## B 445.0000 45.36151 7 381 509
## C 443.7143 69.90878 7 346 507
## D 457.2857 63.65196 7 380 566
## E 468.4286 75.68984 7 372 564
## F 471.2857 68.58988 7 357 536
## G 438.0000 68.10776 7 350 543
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of Studentized Range: 4.541314
##
## Minimun Significant Difference: 43.68315
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 a
## D 457.2857 a
## B 445.0000 a
## C 443.7143 a
## G 438.0000 a
## A 390.7143 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaGreco, "ProteĆna",console=TRUE)
##
## Study: anovaGreco ~ "ProteĆna"
##
## HSD Test for Producción
##
## Mean Square Error: 647.6837
##
## ProteĆna, means
##
## Producción std r Min Max
## a 363.4286 39.84912 7 304 435
## b 384.1429 37.19959 7 340 449
## c 410.7143 29.79214 7 345 432
## d 448.7143 38.16506 7 386 494
## e 472.1429 40.36264 7 413 536
## f 512.4286 22.76589 7 493 554
## g 522.8571 39.66286 7 452 566
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of Studentized Range: 4.541314
##
## Minimun Significant Difference: 43.68315
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## g 522.8571 a
## f 512.4286 ab
## e 472.1429 bc
## d 448.7143 cd
## c 410.7143 de
## b 384.1429 ef
## a 363.4286 f
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SNK.test(anovaGreco, "Lisina",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## Student Newman Keuls Test
## for Producción
##
## Mean Square Error: 647.6837
##
## Lisina, means
##
## Producción std r Min Max
## A 390.7143 67.49250 7 304 495
## B 445.0000 45.36151 7 381 509
## C 443.7143 69.90878 7 346 507
## D 457.2857 63.65196 7 380 566
## E 468.4286 75.68984 7 372 564
## F 471.2857 68.58988 7 357 536
## G 438.0000 68.10776 7 350 543
##
## Alpha: 0.05 ; DF Error: 24
##
## Critical Range
## 2 3 4 5 6 7
## 28.07603 33.97159 37.52646 40.07601 42.06077 43.68315
##
## Means with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 a
## D 457.2857 a
## B 445.0000 a
## C 443.7143 a
## G 438.0000 a
## A 390.7143 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
scheffe.test(anovaGreco, "Lisina",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## Scheffe Test for Producción
##
## Mean Square Error : 647.6837
##
## Lisina, means
##
## Producción std r Min Max
## A 390.7143 67.49250 7 304 495
## B 445.0000 45.36151 7 381 509
## C 443.7143 69.90878 7 346 507
## D 457.2857 63.65196 7 380 566
## E 468.4286 75.68984 7 372 564
## F 471.2857 68.58988 7 357 536
## G 438.0000 68.10776 7 350 543
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of F: 2.508189
##
## Minimum Significant Difference: 52.77196
##
## Means with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 a
## D 457.2857 a
## B 445.0000 a
## C 443.7143 a
## G 438.0000 ab
## A 390.7143 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
duncan.test(anovaGreco, "Lisina",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## Duncan's new multiple range test
## for Producción
##
## Mean Square Error: 647.6837
##
## Lisina, means
##
## Producción std r Min Max
## A 390.7143 67.49250 7 304 495
## B 445.0000 45.36151 7 381 509
## C 443.7143 69.90878 7 346 507
## D 457.2857 63.65196 7 380 566
## E 468.4286 75.68984 7 372 564
## F 471.2857 68.58988 7 357 536
## G 438.0000 68.10776 7 350 543
##
## Alpha: 0.05 ; DF Error: 24
##
## Critical Range
## 2 3 4 5 6 7
## 28.07603 29.48828 30.39500 31.03545 31.51352 31.88335
##
## Means with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 ab
## D 457.2857 ab
## B 445.0000 ab
## C 443.7143 ab
## G 438.0000 b
## A 390.7143 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaGreco, "Lisina", p.adj= "bon",console=TRUE)
##
## Study: anovaGreco ~ "Lisina"
##
## LSD t Test for Producción
## P value adjustment method: bonferroni
##
## Mean Square Error: 647.6837
##
## Lisina, means and individual ( 95 %) CI
##
## Producción std r LCL UCL Min Max
## A 390.7143 67.49250 7 370.8615 410.5670 304 495
## B 445.0000 45.36151 7 425.1472 464.8528 381 509
## C 443.7143 69.90878 7 423.8615 463.5670 346 507
## D 457.2857 63.65196 7 437.4330 477.1385 380 566
## E 468.4286 75.68984 7 448.5758 488.2813 372 564
## F 471.2857 68.58988 7 451.4330 491.1385 357 536
## G 438.0000 68.10776 7 418.1472 457.8528 350 543
##
## Alpha: 0.05 ; DF Error: 24
## Critical Value of t: 3.395988
##
## Minimum Significant Difference: 46.19699
##
## Treatments with the same letter are not significantly different.
##
## Producción groups
## F 471.2857 a
## E 468.4286 a
## D 457.2857 a
## B 445.0000 a
## C 443.7143 a
## G 438.0000 a
## A 390.7143 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
shapiro.test(anovaGreco$res)
##
## Shapiro-Wilk normality test
##
## data: anovaGreco$res
## W = 0.97204, p-value = 0.2915
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(anovaGreco$residuals)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -31.531 -11.673 -3.245 0.000 10.469 48.612
sd((anovaGreco$residuals))
## [1] 17.99561
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaGreco$residuals,col="lightblue")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hist(anovaGreco$residuals, col="lightgreen", main = "Histograma de los Residuos",
freq = F, xlab="Residuos",ylab="Densidad")
lines(density(anovaGreco$residuals), col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
qqnorm(anovaGreco$residuals,col="blue", lwd=3)
qqline(anovaGreco$residuals,col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(anovaGreco$residuals,main = "Residuos vs Observaciones",col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaGreco$residuals~Lisina, xlab="Lisina",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red")) # Homocedasticidad
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaGreco$residuals~ProteĆna, xlab="ProteĆna",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red")) # Homocedasticidad
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaGreco$residuals~Periodo, xlab="Periodo",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red")) # Homocedasticidad
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pred=fitted(anovaGreco)
resid=rstandard(anovaGreco)
plot(pred,resid,xlab="Valores predichos", ylab="Residuos estandarizados",abline(h=0),col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaGreco$residuals ~ Lisina)
##
## Bartlett test of homogeneity of variances
##
## data: anovaGreco$residuals by Lisina
## Bartlett's K-squared = 2.6611, df = 6, p-value = 0.85
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaGreco$residuals ~ ProteĆna)
##
## Bartlett test of homogeneity of variances
##
## data: anovaGreco$residuals by ProteĆna
## Bartlett's K-squared = 2.8279, df = 6, p-value = 0.8301
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaGreco$residuals ~ Periodo)
##
## Bartlett test of homogeneity of variances
##
## data: anovaGreco$residuals by Periodo
## Bartlett's K-squared = 5.1728, df = 6, p-value = 0.5218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BLOQUE | 1 | 2 | 3 | 4 | ||
---|---|---|---|---|---|---|
A | 73 | 74 | ā | 71 | ||
CATALIZADOR | B | ā | 75 | 67 | 72 | |
C | 73 | 75 | 68 | ā | ||
D | 75 | ā | 72 | 75 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 6.2 Ingresando los datos en RStudio
set.seed(7638)
CATALIZADOR <- factor( rep( c("A", "A", "A","B","B","B","C","C","C","D" ,"D","D"), each = 1))
BLOQUE <- factor( rep( c("1", "2", "4", "2", "3", "4","1", "2", "3", "1", "3", "4"), each = 1))
f = PRODUCCION <- c(73, 74, 71, 75, 67, 72, 73, 75, 68, 75, 72, 75)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBIB <- data.frame( BLOQUE, CATALIZADOR, f)
DBIB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(gridExtra)
library(ggplot2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CATALIZADOR2 <- ggplot(DBIB, aes(x = CATALIZADOR, y = f, fill=CATALIZADOR)) +
geom_boxplot() + theme(legend.position = "none")
BLOQUE2 <- ggplot(DBIB, aes(x = BLOQUE, y = f, fill=BLOQUE)) +
geom_boxplot() + theme(legend.position = "none")
grid.arrange(CATALIZADOR2,BLOQUE2, nrow=1,ncol=2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
modeloDBIB= lm(f ~ BLOQUE+CATALIZADOR, DBIB)
anovaDBIB=aov(modeloDBIB)
anovaDBIB
## Call:
## aov(formula = modeloDBIB)
##
## Terms:
## BLOQUE CATALIZADOR Residuals
## Sum of Squares 55.00 22.75 3.25
## Deg. of Freedom 3 3 5
##
## Residual standard error: 0.8062258
## Estimated effects may be unbalanced
summary(anovaDBIB)
## Df Sum Sq Mean Sq F value Pr(>F)
## BLOQUE 3 55.00 18.333 28.20 0.00147 **
## CATALIZADOR 3 22.75 7.583 11.67 0.01074 *
## Residuals 5 3.25 0.650
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(anovaDBIB)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = modeloDBIB)
##
## $BLOQUE
## diff lwr upr p adj
## 2-1 1.000000 -1.428998 3.428998 0.4917130
## 3-1 -4.666667 -7.095665 -2.237669 0.0032954
## 4-1 -1.000000 -3.428998 1.428998 0.4917130
## 3-2 -5.666667 -8.095665 -3.237669 0.0013433
## 4-2 -2.000000 -4.428998 0.428998 0.0975482
## 4-3 3.666667 1.237669 6.095665 0.0096068
##
## $CATALIZADOR
## diff lwr upr p adj
## B-A 0.2222222 -2.2067758 2.651220 0.9852477
## C-A 0.5555556 -1.8734425 2.984554 0.8323947
## D-A 3.2222222 0.7932242 5.651220 0.0165827
## C-B 0.3333333 -2.0956647 2.762331 0.9540767
## D-B 3.0000000 0.5710020 5.428998 0.0222012
## D-C 2.6666667 0.2376686 5.095665 0.0352698
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(TukeyHSD(anovaDBIB))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(agricolae)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBIB,"CATALIZADOR",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## LSD t Test for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## A 72.66667 1.527525 3 71.47013 73.86321 71 74
## B 71.33333 4.041452 3 70.13679 72.52987 67 75
## C 72.00000 3.605551 3 70.80346 73.19654 68 75
## D 74.00000 1.732051 3 72.80346 75.19654 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 2.570582
##
## least Significant Difference: 1.692164
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 b
## B 71.33333 b
plot(LSD.test(anovaDBIB,"CATALIZADOR",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## LSD t Test for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## A 72.66667 1.527525 3 71.47013 73.86321 71 74
## B 71.33333 4.041452 3 70.13679 72.52987 67 75
## C 72.00000 3.605551 3 70.80346 73.19654 68 75
## D 74.00000 1.732051 3 72.80346 75.19654 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 2.570582
##
## least Significant Difference: 1.692164
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 b
## B 71.33333 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBIB,"BLOQUE",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## LSD t Test for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## 1 73.66667 1.1547005 3 72.47013 74.86321 73 75
## 2 74.66667 0.5773503 3 73.47013 75.86321 74 75
## 3 69.00000 2.6457513 3 67.80346 70.19654 67 72
## 4 72.66667 2.0816660 3 71.47013 73.86321 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 2.570582
##
## least Significant Difference: 1.692164
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 ab
## 4 72.66667 b
## 3 69.00000 c
plot(LSD.test(anovaDBIB,"BLOQUE",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## LSD t Test for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## 1 73.66667 1.1547005 3 72.47013 74.86321 73 75
## 2 74.66667 0.5773503 3 73.47013 75.86321 74 75
## 3 69.00000 2.6457513 3 67.80346 70.19654 67 72
## 4 72.66667 2.0816660 3 71.47013 73.86321 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 2.570582
##
## least Significant Difference: 1.692164
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 ab
## 4 72.66667 b
## 3 69.00000 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBIB, "CATALIZADOR",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## HSD Test for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of Studentized Range: 5.218325
##
## Minimun Significant Difference: 2.428998
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
plot(HSD.test(anovaDBIB, "CATALIZADOR",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## HSD Test for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of Studentized Range: 5.218325
##
## Minimun Significant Difference: 2.428998
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBIB, "BLOQUE",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## HSD Test for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of Studentized Range: 5.218325
##
## Minimun Significant Difference: 2.428998
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
plot(HSD.test(anovaDBIB, "BLOQUE",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## HSD Test for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of Studentized Range: 5.218325
##
## Minimun Significant Difference: 2.428998
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SNK.test(anovaDBIB, "CATALIZADOR",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Student Newman Keuls Test
## for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 2.141987 2.428998
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
plot(SNK.test(anovaDBIB, "CATALIZADOR",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Student Newman Keuls Test
## for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 2.141987 2.428998
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SNK.test(anovaDBIB, "BLOQUE",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Student Newman Keuls Test
## for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 2.141987 2.428998
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
plot(SNK.test(anovaDBIB, "BLOQUE",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Student Newman Keuls Test
## for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 2.141987 2.428998
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
scheffe.test(anovaDBIB, "CATALIZADOR",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Scheffe Test for f
##
## Mean Square Error : 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of F: 5.409451
##
## Minimum Significant Difference: 2.651846
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
plot(scheffe.test(anovaDBIB, "CATALIZADOR",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Scheffe Test for f
##
## Mean Square Error : 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of F: 5.409451
##
## Minimum Significant Difference: 2.651846
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 ab
## B 71.33333 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
scheffe.test(anovaDBIB, "BLOQUE",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Scheffe Test for f
##
## Mean Square Error : 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of F: 5.409451
##
## Minimum Significant Difference: 2.651846
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
plot(scheffe.test(anovaDBIB, "BLOQUE",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Scheffe Test for f
##
## Mean Square Error : 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of F: 5.409451
##
## Minimum Significant Difference: 2.651846
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
duncan.test(anovaDBIB, "CATALIZADOR",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Duncan's new multiple range test
## for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 1.744832 1.767154
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 b
## B 71.33333 b
plot(duncan.test(anovaDBIB, "CATALIZADOR",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## Duncan's new multiple range test
## for f
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means
##
## f std r Min Max
## A 72.66667 1.527525 3 71 74
## B 71.33333 4.041452 3 67 75
## C 72.00000 3.605551 3 68 75
## D 74.00000 1.732051 3 72 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 1.744832 1.767154
##
## Means with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 ab
## C 72.00000 b
## B 71.33333 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
duncan.test(anovaDBIB, "BLOQUE",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Duncan's new multiple range test
## for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 1.744832 1.767154
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 ab
## 4 72.66667 b
## 3 69.00000 c
plot(duncan.test(anovaDBIB, "BLOQUE",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## Duncan's new multiple range test
## for f
##
## Mean Square Error: 0.65
##
## BLOQUE, means
##
## f std r Min Max
## 1 73.66667 1.1547005 3 73 75
## 2 74.66667 0.5773503 3 74 75
## 3 69.00000 2.6457513 3 67 72
## 4 72.66667 2.0816660 3 71 75
##
## Alpha: 0.05 ; DF Error: 5
##
## Critical Range
## 2 3 4
## 1.692164 1.744832 1.767154
##
## Means with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 ab
## 4 72.66667 b
## 3 69.00000 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBIB, "CATALIZADOR", p.adj= "bon",console=TRUE)
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## LSD t Test for f
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## A 72.66667 1.527525 3 71.47013 73.86321 71 74
## B 71.33333 4.041452 3 70.13679 72.52987 67 75
## C 72.00000 3.605551 3 70.80346 73.19654 68 75
## D 74.00000 1.732051 3 72.80346 75.19654 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 4.219309
##
## Minimum Significant Difference: 2.777489
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 a
## C 72.00000 a
## B 71.33333 a
plot(LSD.test(anovaDBIB, "CATALIZADOR", p.adj= "bon",console=TRUE))
##
## Study: anovaDBIB ~ "CATALIZADOR"
##
## LSD t Test for f
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.65
##
## CATALIZADOR, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## A 72.66667 1.527525 3 71.47013 73.86321 71 74
## B 71.33333 4.041452 3 70.13679 72.52987 67 75
## C 72.00000 3.605551 3 70.80346 73.19654 68 75
## D 74.00000 1.732051 3 72.80346 75.19654 72 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 4.219309
##
## Minimum Significant Difference: 2.777489
##
## Treatments with the same letter are not significantly different.
##
## f groups
## D 74.00000 a
## A 72.66667 a
## C 72.00000 a
## B 71.33333 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBIB, "BLOQUE", p.adj= "bon",console=TRUE)
##
## Study: anovaDBIB ~ "BLOQUE"
##
## LSD t Test for f
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.65
##
## BLOQUE, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## 1 73.66667 1.1547005 3 72.47013 74.86321 73 75
## 2 74.66667 0.5773503 3 73.47013 75.86321 74 75
## 3 69.00000 2.6457513 3 67.80346 70.19654 67 72
## 4 72.66667 2.0816660 3 71.47013 73.86321 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 4.219309
##
## Minimum Significant Difference: 2.777489
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
plot(LSD.test(anovaDBIB, "BLOQUE", p.adj= "bon",console=TRUE))
##
## Study: anovaDBIB ~ "BLOQUE"
##
## LSD t Test for f
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.65
##
## BLOQUE, means and individual ( 95 %) CI
##
## f std r LCL UCL Min Max
## 1 73.66667 1.1547005 3 72.47013 74.86321 73 75
## 2 74.66667 0.5773503 3 73.47013 75.86321 74 75
## 3 69.00000 2.6457513 3 67.80346 70.19654 67 72
## 4 72.66667 2.0816660 3 71.47013 73.86321 71 75
##
## Alpha: 0.05 ; DF Error: 5
## Critical Value of t: 4.219309
##
## Minimum Significant Difference: 2.777489
##
## Treatments with the same letter are not significantly different.
##
## f groups
## 2 74.66667 a
## 1 73.66667 a
## 4 72.66667 a
## 3 69.00000 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
shapiro.test(anovaDBIB$res)
##
## Shapiro-Wilk normality test
##
## data: anovaDBIB$res
## W = 0.96945, p-value = 0.905
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(anovaDBIB$residuals)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -0.875 -0.375 0.000 0.000 0.375 0.875
sd((anovaDBIB$residuals))
## [1] 0.5435573
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaDBIB$residuals,col="lightblue")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hist(anovaDBIB$residuals, col="lightgreen", main = "Histograma de los Residuos",
freq = F, xlab="Residuos",ylab="Densidad")
lines(density(anovaDBIB$residuals), col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
qqnorm(anovaDBIB$residuals,col="blue", lwd=3)
qqline(anovaDBIB$residuals,col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 6.6 Supuestos del Modelo en RStudio: Supuesto de Independencia
plot(anovaDBIB$residuals,main = "Residuos vs Observaciones",col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaDBIB$residuals~CATALIZADOR, xlab="CATALIZADOR",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaDBIB$residuals~BLOQUE, xlab="BLOQUE",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pred=fitted(anovaDBIB)
resid=rstandard(anovaDBIB)
plot(pred,resid,xlab="Valores predichos", ylab="Residuos estandarizados",abline(h=0),col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaDBIB$residuals ~ CATALIZADOR)
##
## Bartlett test of homogeneity of variances
##
## data: anovaDBIB$residuals by CATALIZADOR
## Bartlett's K-squared = 4.2189, df = 3, p-value = 0.2388
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bartlett.test(anovaDBIB$residuals ~ BLOQUE)
##
## Bartlett test of homogeneity of variances
##
## data: anovaDBIB$residuals by BLOQUE
## Bartlett's K-squared = 1.8464, df = 3, p-value = 0.6049
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("_5-L0gFtEdQ")
B: vel // A: Pro (pulg.) | 0.15 | 0.18 | 0.21 | 0.24 |
---|---|---|---|---|
74 | 79 | 82 | 99 | |
0.20 | 64 | 68 | 88 | 104 |
60 | 73 | 92 | 96 | |
92 | 98 | 99 | 104 | |
0.25 | 86 | 104 | 108 | 110 |
88 | 88 | 95 | 99 | |
99 | 104 | 108 | 114 | |
0.30 | 98 | 99 | 110 | 111 |
102 | 95 | 99 | 107 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
D2F <- expand.grid( A = c(0.15, 0.18, 0.21, 0.24), B = c(0.20, 0.25, 0.30) )
D2F<- rbind(D2F, D2F, D2F )
D2F
f = ACABADO <- c(74, 79, 82, 99, 92, 98, 99, 104, 99, 104, 108, 114, 64, 68, 88, 104, 86, 104, 108, 110, 98, 99, 110, 111, 60, 73, 92, 96, 88, 88, 95, 99, 102, 95, 99, 107)
D2F1 <- data.frame( D2F, f)
D2F1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(f ~ factor(A) * factor(B), data = D2F1, col=c("red", "blue", "yellow", "orange"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mod1 <- aov( f ~ factor(A) * factor(B), data = D2F1 )
summary(mod1)
## Df Sum Sq Mean Sq F value Pr(>F)
## factor(A) 3 2125.1 708.4 24.663 1.65e-07 ***
## factor(B) 2 3160.5 1580.3 55.018 1.09e-09 ***
## factor(A):factor(B) 6 557.1 92.8 3.232 0.018 *
## Residuals 24 689.3 28.7
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g <- lm(f ~ factor(A) * factor(B), data = D2F1)
anova(g)
summary(g)
##
## Call:
## lm(formula = f ~ factor(A) * factor(B), data = D2F1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.6667 -3.6667 -0.3333 3.5833 8.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 66.0000 3.0942 21.330 < 2e-16 ***
## factor(A)0.18 7.3333 4.3759 1.676 0.10675
## factor(A)0.21 21.3333 4.3759 4.875 5.70e-05 ***
## factor(A)0.24 33.6667 4.3759 7.694 6.25e-08 ***
## factor(B)0.25 22.6667 4.3759 5.180 2.64e-05 ***
## factor(B)0.3 33.6667 4.3759 7.694 6.25e-08 ***
## factor(A)0.18:factor(B)0.25 0.6667 6.1884 0.108 0.91511
## factor(A)0.21:factor(B)0.25 -9.3333 6.1884 -1.508 0.14456
## factor(A)0.24:factor(B)0.25 -18.0000 6.1884 -2.909 0.00770 **
## factor(A)0.18:factor(B)0.3 -7.6667 6.1884 -1.239 0.22737
## factor(A)0.21:factor(B)0.3 -15.3333 6.1884 -2.478 0.02065 *
## factor(A)0.24:factor(B)0.3 -22.6667 6.1884 -3.663 0.00123 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.359 on 24 degrees of freedom
## Multiple R-squared: 0.8945, Adjusted R-squared: 0.8461
## F-statistic: 18.49 on 11 and 24 DF, p-value: 4.111e-09
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with(D2F1, (interaction.plot(factor(A), factor(B), f, type = "b",pch = c(18,24,22), leg.bty = "o", main = "GrÔfico de interacción de Velocidad y Profundidad",xlab = "Profundidad",ylab = "f acabado", col=c("red", "blue", "yellow", "orange"))))
## NULL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with(D2F1, (interaction.plot(factor(B), factor(A), f, type = "b",pch = c(18,24,22), leg.bty = "o", main = "GrÔficos de Interacción Velocidad y Profundidad",xlab = "Velocidad",ylab = "f acabado", col=c("darkred", "darkblue", "yellow", "darkorange"))))
## NULL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(mod1)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ factor(A) * factor(B), data = D2F1)
##
## $`factor(A)`
## diff lwr upr p adj
## 0.18-0.15 5.000000 -1.96935966 11.96936 0.2236177
## 0.21-0.15 13.111111 6.14175145 20.08047 0.0001427
## 0.24-0.15 20.111111 13.14175145 27.08047 0.0000002
## 0.21-0.18 8.111111 1.14175145 15.08047 0.0183181
## 0.24-0.18 15.111111 8.14175145 22.08047 0.0000202
## 0.24-0.21 7.000000 0.03064034 13.96936 0.0487217
##
## $`factor(B)`
## diff lwr upr p adj
## 0.25-0.2 16.00 10.536111 21.46389 0.0000004
## 0.3-0.2 22.25 16.786111 27.71389 0.0000000
## 0.3-0.25 6.25 0.786111 11.71389 0.0228257
##
## $`factor(A):factor(B)`
## diff lwr upr p adj
## 0.18:0.2-0.15:0.2 7.3333333 -8.4443944 23.111061 0.8621754
## 0.21:0.2-0.15:0.2 21.3333333 5.5556056 37.111061 0.0026516
## 0.24:0.2-0.15:0.2 33.6666667 17.8889389 49.444394 0.0000035
## 0.15:0.25-0.15:0.2 22.6666667 6.8889389 38.444394 0.0012723
## 0.18:0.25-0.15:0.2 30.6666667 14.8889389 46.444394 0.0000165
## 0.21:0.25-0.15:0.2 34.6666667 18.8889389 50.444394 0.0000021
## 0.24:0.25-0.15:0.2 38.3333333 22.5556056 54.111061 0.0000004
## 0.15:0.3-0.15:0.2 33.6666667 17.8889389 49.444394 0.0000035
## 0.18:0.3-0.15:0.2 33.3333333 17.5556056 49.111061 0.0000041
## 0.21:0.3-0.15:0.2 39.6666667 23.8889389 55.444394 0.0000002
## 0.24:0.3-0.15:0.2 44.6666667 28.8889389 60.444394 0.0000000
## 0.21:0.2-0.18:0.2 14.0000000 -1.7777277 29.777728 0.1156484
## 0.24:0.2-0.18:0.2 26.3333333 10.5556056 42.111061 0.0001693
## 0.15:0.25-0.18:0.2 15.3333333 -0.4443944 31.111061 0.0620975
## 0.18:0.25-0.18:0.2 23.3333333 7.5556056 39.111061 0.0008807
## 0.21:0.25-0.18:0.2 27.3333333 11.5556056 43.111061 0.0000982
## 0.24:0.25-0.18:0.2 31.0000000 15.2222723 46.777728 0.0000139
## 0.15:0.3-0.18:0.2 26.3333333 10.5556056 42.111061 0.0001693
## 0.18:0.3-0.18:0.2 26.0000000 10.2222723 41.777728 0.0002031
## 0.21:0.3-0.18:0.2 32.3333333 16.5556056 48.111061 0.0000069
## 0.24:0.3-0.18:0.2 37.3333333 21.5556056 53.111061 0.0000006
## 0.24:0.2-0.21:0.2 12.3333333 -3.4443944 28.111061 0.2331919
## 0.15:0.25-0.21:0.2 1.3333333 -14.4443944 17.111061 1.0000000
## 0.18:0.25-0.21:0.2 9.3333333 -6.4443944 25.111061 0.6067268
## 0.21:0.25-0.21:0.2 13.3333333 -2.4443944 29.111061 0.1548689
## 0.24:0.25-0.21:0.2 17.0000000 1.2222723 32.777728 0.0270232
## 0.15:0.3-0.21:0.2 12.3333333 -3.4443944 28.111061 0.2331919
## 0.18:0.3-0.21:0.2 12.0000000 -3.7777277 27.777728 0.2649724
## 0.21:0.3-0.21:0.2 18.3333333 2.5556056 34.111061 0.0134649
## 0.24:0.3-0.21:0.2 23.3333333 7.5556056 39.111061 0.0008807
## 0.15:0.25-0.24:0.2 -11.0000000 -26.7777277 4.777728 0.3773797
## 0.18:0.25-0.24:0.2 -3.0000000 -18.7777277 12.777728 0.9998762
## 0.21:0.25-0.24:0.2 1.0000000 -14.7777277 16.777728 1.0000000
## 0.24:0.25-0.24:0.2 4.6666667 -11.1110611 20.444394 0.9935407
## 0.15:0.3-0.24:0.2 0.0000000 -15.7777277 15.777728 1.0000000
## 0.18:0.3-0.24:0.2 -0.3333333 -16.1110611 15.444394 1.0000000
## 0.21:0.3-0.24:0.2 6.0000000 -9.7777277 21.777728 0.9585056
## 0.24:0.3-0.24:0.2 11.0000000 -4.7777277 26.777728 0.3773797
## 0.18:0.25-0.15:0.25 8.0000000 -7.7777277 23.777728 0.7881462
## 0.21:0.25-0.15:0.25 12.0000000 -3.7777277 27.777728 0.2649724
## 0.24:0.25-0.15:0.25 15.6666667 -0.1110611 31.444394 0.0528028
## 0.15:0.3-0.15:0.25 11.0000000 -4.7777277 26.777728 0.3773797
## 0.18:0.3-0.15:0.25 10.6666667 -5.1110611 26.444394 0.4200394
## 0.21:0.3-0.15:0.25 17.0000000 1.2222723 32.777728 0.0270232
## 0.24:0.3-0.15:0.25 22.0000000 6.2222723 37.777728 0.0018375
## 0.21:0.25-0.18:0.25 4.0000000 -11.7777277 19.777728 0.9982365
## 0.24:0.25-0.18:0.25 7.6666667 -8.1110611 23.444394 0.8270901
## 0.15:0.3-0.18:0.25 3.0000000 -12.7777277 18.777728 0.9998762
## 0.18:0.3-0.18:0.25 2.6666667 -13.1110611 18.444394 0.9999609
## 0.21:0.3-0.18:0.25 9.0000000 -6.7777277 24.777728 0.6544316
## 0.24:0.3-0.18:0.25 14.0000000 -1.7777277 29.777728 0.1156484
## 0.24:0.25-0.21:0.25 3.6666667 -12.1110611 19.444394 0.9991877
## 0.15:0.3-0.21:0.25 -1.0000000 -16.7777277 14.777728 1.0000000
## 0.18:0.3-0.21:0.25 -1.3333333 -17.1110611 14.444394 1.0000000
## 0.21:0.3-0.21:0.25 5.0000000 -10.7777277 20.777728 0.9888577
## 0.24:0.3-0.21:0.25 10.0000000 -5.7777277 25.777728 0.5112272
## 0.15:0.3-0.24:0.25 -4.6666667 -20.4443944 11.111061 0.9935407
## 0.18:0.3-0.24:0.25 -5.0000000 -20.7777277 10.777728 0.9888577
## 0.21:0.3-0.24:0.25 1.3333333 -14.4443944 17.111061 1.0000000
## 0.24:0.3-0.24:0.25 6.3333333 -9.4443944 22.111061 0.9410768
## 0.18:0.3-0.15:0.3 -0.3333333 -16.1110611 15.444394 1.0000000
## 0.21:0.3-0.15:0.3 6.0000000 -9.7777277 21.777728 0.9585056
## 0.24:0.3-0.15:0.3 11.0000000 -4.7777277 26.777728 0.3773797
## 0.21:0.3-0.18:0.3 6.3333333 -9.4443944 22.111061 0.9410768
## 0.24:0.3-0.18:0.3 11.3333333 -4.4443944 27.111061 0.3371703
## 0.24:0.3-0.21:0.3 5.0000000 -10.7777277 20.777728 0.9888577
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_youtube("UxVEHWf-Fdw")
: A1 // B: | B1 | B1 | B1 | B2 | B2 | B2 |
---|---|---|---|---|---|---|
60 | 75 | 75 | 67 | 73 | 73 | |
C1 | 86 | 70 | 70 | 67 | 68 | 68 |
55 | 53 | 53 | 52 | 52 | 57 | |
C2 | 55 | 55 | 55 | 52 | 54 | 54 |
: A2 // B: | B1 | B1 | B1 | B2 | B2 | B2 |
---|---|---|---|---|---|---|
62 | 68 | 65 | 71 | 80 | 80 | |
C1 | 76 | 65 | 65 | 72 | 80 | 80 |
44 | 44 | 45 | 60 | 60 | 60 | |
C2 | 48 | 48 | 45 | 67 | 67 | 65 |
: A3 // B: | B1 | B1 | B1 | B2 | B2 | B2 |
---|---|---|---|---|---|---|
70 | 71 | 75 | 75 | 75 | 75 | |
C1 | 76 | 68 | 73 | 75 | 75 | 77 |
52 | 51 | 50 | 56 | 55 | 57 | |
C2 | 52 | 48 | 54 | 59 | 50 | 55 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
D3F <- expand.grid( A = c("A1", "A2", "A3"), B = c("B1", "B2"), C = c("C1", "C2") )
D3F
D3F<- rbind(D3F, D3F, D3F, D3F,D3F, D3F )
D3F
f = volumen <- c(60,62,70,67,71,75,55,44,54,52,60,55,86,68,71,73,80,75,53,48,48,52,60,57,75,65,75,73,80,75,53,44,52,57,60,50,75,76,76,67,72,75,55,45,50,52,67,55,70,65,68,68,80,75,55,48,51,54,67,56,70,65,73,68,80,77,55,45,52,54,65, 59)
D3F1 <- data.frame( D3F, f)
D3F1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(f ~ factor(A) * factor(B)* factor(C), data = D3F1, col=c("red", "blue", "yellow", "orange"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mod1 <- aov( f ~ factor(A) * factor(B)* factor(C), data = D3F1 )
summary(mod1)
## Df Sum Sq Mean Sq F value Pr(>F)
## factor(A) 2 14 7 0.494 0.6126
## factor(B) 1 480 480 34.253 2.16e-07 ***
## factor(C) 1 6087 6087 433.905 < 2e-16 ***
## factor(A):factor(B) 2 788 394 28.096 2.45e-09 ***
## factor(A):factor(C) 2 41 20 1.456 0.2412
## factor(B):factor(C) 1 57 57 4.055 0.0485 *
## factor(A):factor(B):factor(C) 2 31 16 1.106 0.3375
## Residuals 60 842 14
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
g <- lm(f ~ factor(A) * factor(B)* factor(C), data = D3F1)
anova(g)
summary(g)
##
## Call:
## lm(formula = f ~ factor(A) * factor(B) * factor(C), data = D3F1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -12.6667 -1.7083 -0.3333 2.3333 13.3333
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 72.667 1.529 47.524 < 2e-16 ***
## factor(A)A2 -5.833 2.162 -2.698 0.00905 **
## factor(A)A3 -0.500 2.162 -0.231 0.81793
## factor(B)B2 -3.333 2.162 -1.542 0.12845
## factor(C)C2 -18.333 2.162 -8.478 7.52e-12 ***
## factor(A)A2:factor(B)B2 13.667 3.058 4.469 3.55e-05 ***
## factor(A)A3:factor(B)B2 6.500 3.058 2.126 0.03767 *
## factor(A)A2:factor(C)C2 -2.833 3.058 -0.927 0.35789
## factor(A)A3:factor(C)C2 -2.667 3.058 -0.872 0.38668
## factor(B)B2:factor(C)C2 2.500 3.058 0.818 0.41687
## factor(A)A2:factor(B)B2:factor(C)C2 4.667 4.325 1.079 0.28488
## factor(A)A3:factor(B)B2:factor(C)C2 -1.500 4.325 -0.347 0.72993
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.745 on 60 degrees of freedom
## Multiple R-squared: 0.8991, Adjusted R-squared: 0.8806
## F-statistic: 48.59 on 11 and 60 DF, p-value: < 2.2e-16
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with(D3F1, (interaction.plot(factor(A), factor(B), f, type = "b",pch = c(18,24,22), leg.bty = "o", main = "GrÔficos de Interacción Suspensión y Abertura",xlab = "Suspensión",ylab = "f Volumen", col=c("red", "blue", "yellow", "orange"))))
## NULL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with(D3F1, (interaction.plot(factor(A), factor(C), f, type = "b",pch = c(18,24,22), leg.bty = "o", main = "GrĆ”ficos de Interacción Suspensión y Temperatura",xlab = "Suspensión",ylab = "f Volumen", col=c("red", "blue", "yellow", "orange"))))
## NULL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
with(D3F1, (interaction.plot(factor(B), factor(C), f, type = "b",pch = c(18,24,22), leg.bty = "o", main = "GrÔficos de Interacción Abertura y Temperatura",xlab = "Abertura",ylab = "f Volumen", col=c("red", "blue", "yellow", "orange"))))
## NULL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(mod1)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ factor(A) * factor(B) * factor(C), data = D3F1)
##
## $`factor(A)`
## diff lwr upr p adj
## A2-A1 0.7500000 -1.848344 3.348344 0.7680852
## A3-A1 1.0416667 -1.556678 3.640011 0.6026331
## A3-A2 0.2916667 -2.306678 2.890011 0.9607046
##
## $`factor(B)`
## diff lwr upr p adj
## B2-B1 5.166667 3.400821 6.932513 2e-07
##
## $`factor(C)`
## diff lwr upr p adj
## C2-C1 -18.38889 -20.15473 -16.62304 0
##
## $`factor(A):factor(B)`
## diff lwr upr p adj
## A2:B1-A1:B1 -7.250000 -11.7511865 -2.7488135 0.0001895
## A3:B1-A1:B1 -1.833333 -6.3345198 2.6678531 0.8356078
## A1:B2-A1:B1 -2.083333 -6.5845198 2.4178531 0.7488090
## A2:B2-A1:B1 6.666667 2.1654802 11.1678531 0.0007097
## A3:B2-A1:B1 1.833333 -2.6678531 6.3345198 0.8356078
## A3:B1-A2:B1 5.416667 0.9154802 9.9178531 0.0096192
## A1:B2-A2:B1 5.166667 0.6654802 9.6678531 0.0154752
## A2:B2-A2:B1 13.916667 9.4154802 18.4178531 0.0000000
## A3:B2-A2:B1 9.083333 4.5821469 13.5845198 0.0000023
## A1:B2-A3:B1 -0.250000 -4.7511865 4.2511865 0.9999829
## A2:B2-A3:B1 8.500000 3.9988135 13.0011865 0.0000096
## A3:B2-A3:B1 3.666667 -0.8345198 8.1678531 0.1734453
## A2:B2-A1:B2 8.750000 4.2488135 13.2511865 0.0000052
## A3:B2-A1:B2 3.916667 -0.5845198 8.4178531 0.1230911
## A3:B2-A2:B2 -4.833333 -9.3345198 -0.3321469 0.0283481
##
## $`factor(A):factor(C)`
## diff lwr upr p adj
## A2:C1-A1:C1 1.0000000 -3.501186 5.501186 0.9861601
## A3:C1-A1:C1 2.7500000 -1.751186 7.251186 0.4744663
## A1:C2-A1:C1 -17.0833333 -21.584520 -12.582147 0.0000000
## A2:C2-A1:C1 -16.5833333 -21.084520 -12.082147 0.0000000
## A3:C2-A1:C1 -17.7500000 -22.251186 -13.248814 0.0000000
## A3:C1-A2:C1 1.7500000 -2.751186 6.251186 0.8606445
## A1:C2-A2:C1 -18.0833333 -22.584520 -13.582147 0.0000000
## A2:C2-A2:C1 -17.5833333 -22.084520 -13.082147 0.0000000
## A3:C2-A2:C1 -18.7500000 -23.251186 -14.248814 0.0000000
## A1:C2-A3:C1 -19.8333333 -24.334520 -15.332147 0.0000000
## A2:C2-A3:C1 -19.3333333 -23.834520 -14.832147 0.0000000
## A3:C2-A3:C1 -20.5000000 -25.001186 -15.998814 0.0000000
## A2:C2-A1:C2 0.5000000 -4.001186 5.001186 0.9994780
## A3:C2-A1:C2 -0.6666667 -5.167853 3.834520 0.9979060
## A3:C2-A2:C2 -1.1666667 -5.667853 3.334520 0.9726219
##
## $`factor(B):factor(C)`
## diff lwr upr p adj
## B2:C1-B1:C1 3.388889 0.08981796 6.687960 0.0418949
## B1:C2-B1:C1 -20.166667 -23.46573760 -16.867596 0.0000000
## B2:C2-B1:C1 -13.222222 -16.52129315 -9.923151 0.0000000
## B1:C2-B2:C1 -23.555556 -26.85462649 -20.256485 0.0000000
## B2:C2-B2:C1 -16.611111 -19.91018204 -13.312040 0.0000000
## B2:C2-B1:C2 6.944444 3.64537351 10.243515 0.0000038
##
## $`factor(A):factor(B):factor(C)`
## diff lwr upr p adj
## A2:B1:C1-A1:B1:C1 -5.8333333 -13.1856861 1.5190194 0.2527629
## A3:B1:C1-A1:B1:C1 -0.5000000 -7.8523528 6.8523528 1.0000000
## A1:B2:C1-A1:B1:C1 -3.3333333 -10.6856861 4.0190194 0.9223912
## A2:B2:C1-A1:B1:C1 4.5000000 -2.8523528 11.8523528 0.6375599
## A3:B2:C1-A1:B1:C1 2.6666667 -4.6856861 10.0190194 0.9839113
## A1:B1:C2-A1:B1:C1 -18.3333333 -25.6856861 -10.9809806 0.0000000
## A2:B1:C2-A1:B1:C1 -27.0000000 -34.3523528 -19.6476472 0.0000000
## A3:B1:C2-A1:B1:C1 -21.5000000 -28.8523528 -14.1476472 0.0000000
## A1:B2:C2-A1:B1:C1 -19.1666667 -26.5190194 -11.8143139 0.0000000
## A2:B2:C2-A1:B1:C1 -9.5000000 -16.8523528 -2.1476472 0.0025052
## A3:B2:C2-A1:B1:C1 -17.3333333 -24.6856861 -9.9809806 0.0000000
## A3:B1:C1-A2:B1:C1 5.3333333 -2.0190194 12.6856861 0.3802875
## A1:B2:C1-A2:B1:C1 2.5000000 -4.8523528 9.8523528 0.9903398
## A2:B2:C1-A2:B1:C1 10.3333333 2.9809806 17.6856861 0.0006757
## A3:B2:C1-A2:B1:C1 8.5000000 1.1476472 15.8523528 0.0109430
## A1:B1:C2-A2:B1:C1 -12.5000000 -19.8523528 -5.1476472 0.0000176
## A2:B1:C2-A2:B1:C1 -21.1666667 -28.5190194 -13.8143139 0.0000000
## A3:B1:C2-A2:B1:C1 -15.6666667 -23.0190194 -8.3143139 0.0000001
## A1:B2:C2-A2:B1:C1 -13.3333333 -20.6856861 -5.9809806 0.0000041
## A2:B2:C2-A2:B1:C1 -3.6666667 -11.0190194 3.6856861 0.8630813
## A3:B2:C2-A2:B1:C1 -11.5000000 -18.8523528 -4.1476472 0.0000982
## A1:B2:C1-A3:B1:C1 -2.8333333 -10.1856861 4.5190194 0.9745590
## A2:B2:C1-A3:B1:C1 5.0000000 -2.3523528 12.3523528 0.4796825
## A3:B2:C1-A3:B1:C1 3.1666667 -4.1856861 10.5190194 0.9443710
## A1:B1:C2-A3:B1:C1 -17.8333333 -25.1856861 -10.4809806 0.0000000
## A2:B1:C2-A3:B1:C1 -26.5000000 -33.8523528 -19.1476472 0.0000000
## A3:B1:C2-A3:B1:C1 -21.0000000 -28.3523528 -13.6476472 0.0000000
## A1:B2:C2-A3:B1:C1 -18.6666667 -26.0190194 -11.3143139 0.0000000
## A2:B2:C2-A3:B1:C1 -9.0000000 -16.3523528 -1.6476472 0.0053152
## A3:B2:C2-A3:B1:C1 -16.8333333 -24.1856861 -9.4809806 0.0000000
## A2:B2:C1-A1:B2:C1 7.8333333 0.4809806 15.1856861 0.0271441
## A3:B2:C1-A1:B2:C1 6.0000000 -1.3523528 13.3523528 0.2172776
## A1:B1:C2-A1:B2:C1 -15.0000000 -22.3523528 -7.6476472 0.0000002
## A2:B1:C2-A1:B2:C1 -23.6666667 -31.0190194 -16.3143139 0.0000000
## A3:B1:C2-A1:B2:C1 -18.1666667 -25.5190194 -10.8143139 0.0000000
## A1:B2:C2-A1:B2:C1 -15.8333333 -23.1856861 -8.4809806 0.0000000
## A2:B2:C2-A1:B2:C1 -6.1666667 -13.5190194 1.1856861 0.1854455
## A3:B2:C2-A1:B2:C1 -14.0000000 -21.3523528 -6.6476472 0.0000012
## A3:B2:C1-A2:B2:C1 -1.8333333 -9.1856861 5.5190194 0.9993589
## A1:B1:C2-A2:B2:C1 -22.8333333 -30.1856861 -15.4809806 0.0000000
## A2:B1:C2-A2:B2:C1 -31.5000000 -38.8523528 -24.1476472 0.0000000
## A3:B1:C2-A2:B2:C1 -26.0000000 -33.3523528 -18.6476472 0.0000000
## A1:B2:C2-A2:B2:C1 -23.6666667 -31.0190194 -16.3143139 0.0000000
## A2:B2:C2-A2:B2:C1 -14.0000000 -21.3523528 -6.6476472 0.0000012
## A3:B2:C2-A2:B2:C1 -21.8333333 -29.1856861 -14.4809806 0.0000000
## A1:B1:C2-A3:B2:C1 -21.0000000 -28.3523528 -13.6476472 0.0000000
## A2:B1:C2-A3:B2:C1 -29.6666667 -37.0190194 -22.3143139 0.0000000
## A3:B1:C2-A3:B2:C1 -24.1666667 -31.5190194 -16.8143139 0.0000000
## A1:B2:C2-A3:B2:C1 -21.8333333 -29.1856861 -14.4809806 0.0000000
## A2:B2:C2-A3:B2:C1 -12.1666667 -19.5190194 -4.8143139 0.0000314
## A3:B2:C2-A3:B2:C1 -20.0000000 -27.3523528 -12.6476472 0.0000000
## A2:B1:C2-A1:B1:C2 -8.6666667 -16.0190194 -1.3143139 0.0086330
## A3:B1:C2-A1:B1:C2 -3.1666667 -10.5190194 4.1856861 0.9443710
## A1:B2:C2-A1:B1:C2 -0.8333333 -8.1856861 6.5190194 0.9999998
## A2:B2:C2-A1:B1:C2 8.8333333 1.4809806 16.1856861 0.0067858
## A3:B2:C2-A1:B1:C2 1.0000000 -6.3523528 8.3523528 0.9999985
## A3:B1:C2-A2:B1:C2 5.5000000 -1.8523528 12.8523528 0.3344782
## A1:B2:C2-A2:B1:C2 7.8333333 0.4809806 15.1856861 0.0271441
## A2:B2:C2-A2:B1:C2 17.5000000 10.1476472 24.8523528 0.0000000
## A3:B2:C2-A2:B1:C2 9.6666667 2.3143139 17.0190194 0.0019379
## A1:B2:C2-A3:B1:C2 2.3333333 -5.0190194 9.6856861 0.9945288
## A2:B2:C2-A3:B1:C2 12.0000000 4.6476472 19.3523528 0.0000418
## A3:B2:C2-A3:B1:C2 4.1666667 -3.1856861 11.5190194 0.7380170
## A2:B2:C2-A1:B2:C2 9.6666667 2.3143139 17.0190194 0.0019379
## A3:B2:C2-A1:B2:C2 1.8333333 -5.5190194 9.1856861 0.9993589
## A3:B2:C2-A2:B2:C2 -7.8333333 -15.1856861 -0.4809806 0.0271441
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(mod1, "factor(A)")
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ factor(A) * factor(B) * factor(C), data = D3F1)
##
## $`factor(A)`
## diff lwr upr p adj
## A2-A1 0.7500000 -1.848344 3.348344 0.7680852
## A3-A1 1.0416667 -1.556678 3.640011 0.6026331
## A3-A2 0.2916667 -2.306678 2.890011 0.9607046
plot(TukeyHSD(mod1, "factor(A)"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(mod1, "factor(B)")
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ factor(A) * factor(B) * factor(C), data = D3F1)
##
## $`factor(B)`
## diff lwr upr p adj
## B2-B1 5.166667 3.400821 6.932513 2e-07
plot(TukeyHSD(mod1, "factor(B)"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(mod1, "factor(C)")
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = f ~ factor(A) * factor(B) * factor(C), data = D3F1)
##
## $`factor(C)`
## diff lwr upr p adj
## C2-C1 -18.38889 -20.15473 -16.62304 0
plot(TukeyHSD(mod1, "factor(C)"))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
embed_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4.3,4.2,
6.0, 6.5,4.1, 6.9)
Tratamientos =factor( c(rep("A",1),
rep("B",1),
rep("C",1),
rep("D",1)))
Bloques = factor(c(rep("I",4),
rep("II",4),
rep("III",4),
rep("IV",4),
rep("V",4)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DBCA1 = data.frame(Bloques,Tratamientos, V.sanguĆneo)
DBCA1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(gridExtra)
library(ggplot2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Tratamientos2 <- ggplot(DBCA1, aes(x = Tratamientos, y = V.sanguĆneo, fill=Tratamientos)) +
geom_boxplot() + theme(legend.position = "none")
Bloques2 <- ggplot(DBCA1, aes(x = Bloques, y = V.sanguĆneo, fill=Bloques)) +
geom_boxplot() + theme(legend.position = "none")
grid.arrange(Tratamientos2,Bloques2, nrow=1, ncol=2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
modeloDBCA1= lm(V.sanguĆneo ~ Tratamientos + Bloques, DBCA1)
anovaDBCA1=aov(modeloDBCA1)
anovaDBCA1
## Call:
## aov(formula = modeloDBCA1)
##
## Terms:
## Tratamientos Bloques Residuals
## Sum of Squares 12.550 3.755 8.345
## Deg. of Freedom 3 4 12
##
## Residual standard error: 0.8339165
## Estimated effects may be unbalanced
summary(anovaDBCA1)
## Df Sum Sq Mean Sq F value Pr(>F)
## Tratamientos 3 12.550 4.183 6.016 0.00964 **
## Bloques 4 3.755 0.939 1.350 0.30797
## Residuals 12 8.345 0.695
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TukeyHSD(anovaDBCA1)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = modeloDBCA1)
##
## $Tratamientos
## diff lwr upr p adj
## B-A 1.4 -0.1658432 2.9658432 0.0854565
## C-A -0.8 -2.3658432 0.7658432 0.4580868
## D-A 0.4 -1.1658432 1.9658432 0.8713824
## C-B -2.2 -3.7658432 -0.6341568 0.0061420
## D-B -1.0 -2.5658432 0.5658432 0.2800111
## D-C 1.2 -0.3658432 2.7658432 0.1586223
##
## $Bloques
## diff lwr upr p adj
## II-I 0.000000e+00 -1.8795268 1.879527 1.0000000
## III-I 7.750000e-01 -1.1045268 2.654527 0.6881671
## IV-I -8.881784e-16 -1.8795268 1.879527 1.0000000
## V-I 9.750000e-01 -0.9045268 2.854527 0.4944147
## III-II 7.750000e-01 -1.1045268 2.654527 0.6881671
## IV-II -8.881784e-16 -1.8795268 1.879527 1.0000000
## V-II 9.750000e-01 -0.9045268 2.854527 0.4944147
## IV-III -7.750000e-01 -2.6545268 1.104527 0.6881671
## V-III 2.000000e-01 -1.6795268 2.079527 0.9967411
## V-IV 9.750000e-01 -0.9045268 2.854527 0.4944147
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(TukeyHSD(anovaDBCA1))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
library(agricolae)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1,"Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.149139
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 bc
## C 4.2 c
plot(LSD.test(anovaDBCA1,"Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.149139
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 bc
## C 4.2 c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1,"Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## I 4.900 1.131371 4 3.991526 5.808474 4.1 6.5
## II 4.900 1.048809 4 3.991526 5.808474 4.0 6.2
## III 5.675 1.201041 4 4.766526 6.583474 4.5 6.9
## IV 4.900 1.267544 4 3.991526 5.808474 4.2 6.8
## V 5.875 1.239287 4 4.966526 6.783474 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.284776
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
plot(LSD.test(anovaDBCA1,"Bloques",console=TRUE))
##
## Study: anovaDBCA1 ~ "Bloques"
##
## LSD t Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## I 4.900 1.131371 4 3.991526 5.808474 4.1 6.5
## II 4.900 1.048809 4 3.991526 5.808474 4.0 6.2
## III 5.675 1.201041 4 4.766526 6.583474 4.5 6.9
## IV 4.900 1.267544 4 3.991526 5.808474 4.2 6.8
## V 5.875 1.239287 4 4.966526 6.783474 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 2.178813
##
## least Significant Difference: 1.284776
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.19866
##
## Minimun Significant Difference: 1.565843
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(HSD.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.19866
##
## Minimun Significant Difference: 1.565843
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSD.test(anovaDBCA1, "Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## HSD Test for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of Studentized Range: 4.50771
##
## Minimun Significant Difference: 1.879527
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SNK.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Student Newman Keuls Test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.407072 1.565843
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(SNK.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Student Newman Keuls Test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.407072 1.565843
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
scheffe.test(anovaDBCA1, "Bloques",console=TRUE)
##
## Study: anovaDBCA1 ~ "Bloques"
##
## Scheffe Test for V.sanguĆneo
##
## Mean Square Error : 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of F: 3.259167
##
## Minimum Significant Difference: 2.129074
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
plot(scheffe.test(anovaDBCA1, "Bloques",console=TRUE))
##
## Study: anovaDBCA1 ~ "Bloques"
##
## Scheffe Test for V.sanguĆneo
##
## Mean Square Error : 0.6954167
##
## Bloques, means
##
## V.sanguĆneo std r Min Max
## I 4.900 1.131371 4 4.1 6.5
## II 4.900 1.048809 4 4.0 6.2
## III 5.675 1.201041 4 4.5 6.9
## IV 4.900 1.267544 4 4.2 6.8
## V 5.875 1.239287 4 4.1 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of F: 3.259167
##
## Minimum Significant Difference: 2.129074
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## V 5.875 a
## III 5.675 a
## I 4.900 a
## II 4.900 a
## IV 4.900 a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
duncan.test(anovaDBCA1, "Tratamientos",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Duncan's new multiple range test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.202818 1.235342
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 b
## C 4.2 b
plot(duncan.test(anovaDBCA1, "Tratamientos",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## Duncan's new multiple range test
## for V.sanguĆneo
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means
##
## V.sanguĆneo std r Min Max
## A 5.0 1.1575837 5 4.1 6.5
## B 6.4 0.6403124 5 5.3 6.9
## C 4.2 0.2000000 5 4.0 4.5
## D 5.4 1.1113055 5 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
##
## Critical Range
## 2 3 4
## 1.149139 1.202818 1.235342
##
## Means with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 b
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LSD.test(anovaDBCA1, "Tratamientos", p.adj= "bon",console=TRUE)
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 3.152681
##
## Minimum Significant Difference: 1.662772
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
plot(LSD.test(anovaDBCA1, "Tratamientos", p.adj= "bon",console=TRUE))
##
## Study: anovaDBCA1 ~ "Tratamientos"
##
## LSD t Test for V.sanguĆneo
## P value adjustment method: bonferroni
##
## Mean Square Error: 0.6954167
##
## Tratamientos, means and individual ( 95 %) CI
##
## V.sanguĆneo std r LCL UCL Min Max
## A 5.0 1.1575837 5 4.187436 5.812564 4.1 6.5
## B 6.4 0.6403124 5 5.587436 7.212564 5.3 6.9
## C 4.2 0.2000000 5 3.387436 5.012564 4.0 4.5
## D 5.4 1.1113055 5 4.587436 6.212564 4.2 6.9
##
## Alpha: 0.05 ; DF Error: 12
## Critical Value of t: 3.152681
##
## Minimum Significant Difference: 1.662772
##
## Treatments with the same letter are not significantly different.
##
## V.sanguĆneo groups
## B 6.4 a
## D 5.4 ab
## A 5.0 ab
## C 4.2 b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
shapiro.test(anovaDBCA1$res)
##
## Shapiro-Wilk normality test
##
## data: anovaDBCA1$res
## W = 0.95529, p-value = 0.4545
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
summary(anovaDBCA1$residuals)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -1.025 -0.550 -0.025 0.000 0.450 1.150
sd((anovaDBCA1$residuals))
## [1] 0.6627296
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
boxplot(anovaDBCA1$residuals,col="lightblue")
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hist(anovaDBCA1$residuals, col="lightgreen", main = "Histograma de los Residuos",
freq = F, xlab="Residuos",ylab="Densidad")
lines(density(anovaDBCA1$residuals), col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
qqnorm(anovaDBCA1$residuals,col="blue", lwd=3)
qqline(anovaDBCA1$residuals,col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 2.6 Supuestos del Modelo en RStudio: Supuesto de Independencia
plot(anovaDBCA1$residuals,main = "Residuos vs Observaciones",col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## 2.6 Supuestos del Modelo en RStudio: Supuesto de Homocedasticidad
boxplot(anovaDBCA1$residuals~Bloques, xlab="Bloques",ylab="Residuos",
col = c("yellow", "blue", "white","green", "red"))
names(anovaDBCA1)
## [1] "coefficients" "residuals" "effects" "rank"
## [5] "fitted.values" "assign" "qr" "df.residual"
## [9] "contrasts" "xlevels" "call" "terms"
## [13] "model"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pred=fitted(anovaDBCA1)
resid=rstandard(anovaDBCA1)
plot(pred,resid,xlab="Valores predichos", ylab="Residuos estandarizados",abline(h=0),col="red", lwd=3)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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