library(readxl)
T1_DOE <- read_excel("D:/Libros de Ingeniería/T1_DOE.xlsx", sheet = "E1")
library(knitr)
library(kableExtra)
kable(T1_DOE, format = "html", style = "rmarkdown", justify = "center", report.nas = FALSE)%>% kable_styling(full_width = FALSE, position = "center")
| Blancura | Detergente | Lavadora |
|---|---|---|
| 45 | A | Lavadora 1 |
| 47 | B | Lavadora 1 |
| 50 | C | Lavadora 1 |
| 42 | D | Lavadora 1 |
| 43 | A | Lavadora 2 |
| 44 | B | Lavadora 2 |
| 49 | C | Lavadora 2 |
| 37 | D | Lavadora 2 |
| 51 | A | Lavadora 3 |
| 52 | B | Lavadora 3 |
| 57 | C | Lavadora 3 |
| 49 | D | Lavadora 3 |
attach(T1_DOE)
anova_e1<- aov(Blancura ~Detergente+Lavadora)
summary(anova_e1)
## Df Sum Sq Mean Sq F value Pr(>F)
## Detergente 3 133.67 44.56 34.13 0.000363 ***
## Lavadora 2 170.17 85.08 65.17 8.52e-05 ***
## Residuals 6 7.83 1.31
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
library(agricolae)
signif_lsd<-LSD.test(anova_e1,trt="Detergente", group=F,console=T)
##
## Study: anova_e1 ~ "Detergente"
##
## LSD t Test for Blancura
##
## Mean Square Error: 1.305556
##
## Detergente, means and individual ( 95 %) CI
##
## Blancura std r se LCL UCL Min Max Q25 Q50 Q75
## A 46.33333 4.163332 3 0.6596857 44.71914 47.94753 43 51 44.0 45 48.0
## B 47.66667 4.041452 3 0.6596857 46.05247 49.28086 44 52 45.5 47 49.5
## C 52.00000 4.358899 3 0.6596857 50.38581 53.61419 49 57 49.5 50 53.5
## D 42.66667 6.027714 3 0.6596857 41.05247 44.28086 37 49 39.5 42 45.5
##
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912
##
## Comparison between treatments means
##
## difference pvalue signif. LCL UCL
## A - B -1.333333 0.2029 -3.616147 0.9494799
## A - C -5.666667 0.0009 *** -7.949480 -3.3838535
## A - D 3.666667 0.0077 ** 1.383853 5.9494799
## B - C -4.333333 0.0035 ** -6.616147 -2.0505201
## B - D 5.000000 0.0017 ** 2.717187 7.2828132
## C - D 9.333333 0.0001 *** 7.050520 11.6161465
graf_medias<-LSD.test(anova_e1,trt="Detergente", group=T,console=T)
##
## Study: anova_e1 ~ "Detergente"
##
## LSD t Test for Blancura
##
## Mean Square Error: 1.305556
##
## Detergente, means and individual ( 95 %) CI
##
## Blancura std r se LCL UCL Min Max Q25 Q50 Q75
## A 46.33333 4.163332 3 0.6596857 44.71914 47.94753 43 51 44.0 45 48.0
## B 47.66667 4.041452 3 0.6596857 46.05247 49.28086 44 52 45.5 47 49.5
## C 52.00000 4.358899 3 0.6596857 50.38581 53.61419 49 57 49.5 50 53.5
## D 42.66667 6.027714 3 0.6596857 41.05247 44.28086 37 49 39.5 42 45.5
##
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912
##
## least Significant Difference: 2.282813
##
## Treatments with the same letter are not significantly different.
##
## Blancura groups
## C 52.00000 a
## B 47.66667 b
## A 46.33333 b
## D 42.66667 c
plot(graf_medias,main="Comparación de medias por LSD de Fisher", xlab="Detergente", ylab="Blancura")