Beruflich Dokumente
Kultur Dokumente
RAFAEL BOLAÑO
YESICA CAVADIA
JUAN CAUSIL
PROF.
UNIVERSIDAD DE CORDOBA
PROGRAMA ACUICULTURA
MONTERIA
2019
PROCEDIMIENTO
yijk = μ+αi+βj+(αβ)ij+εijk
Ho = α1= α2
Vs
H1 = Al menos α1≠ αi’
Ho = β1= β2= β3
Vs
H1 = Al manos βj≠βj’
Ho = (α β)ij = 0, Ɐij
Vs
H1 = (α β)ij ≠ 0, Ǝij
Ingresos de datos.
Los datos fueron ingresados de la siguiente manera:
AMBIENTE=factor(rep(1:2, each=24),
labels = c("Libre","Restringido"))
CEPA=factor(rep(rep(1:3, each=8), 2),
labels = c("BRILLANTE","MEZCLA","TORPE"))
DESEMPEÑO=c( 28, 12, 22, 23, 25, 10, 36, 86,
33, 83, 36, 14, 41, 76, 22, 58,
101, 94, 33, 56, 122, 83, 35, 23,
72, 32, 48, 93, 25, 31, 91, 19,
60, 89, 35, 126, 83, 110, 99, 118,
136, 120, 38, 153, 64, 128, 87, 140)
Luego de llamar la base de datos y fijar las variables, realizamos estadística
descriptiva para los diferentes factores:
EST.AMBIENTE = data.frame(
TOTAL = tapply(DESEMPEÑO,AMBIENTE,sum),
MEDIA = tapply(DESEMPEÑO,AMBIENTE,mean),
VARIANZA = tapply(DESEMPEÑO,AMBIENTE,var)
)
EST.AMBIENTE
TOTAL MEDIA VARIANZA
Libre 1152 48.00000 1027.217
Restringido 1997 83.20833 1650.259
plot(DESEMPEÑO ~ AMBIENTE)
Estadística descriptiva para el factor cepa:
EST.CEPA = data.frame(
TOTAL = tapply(DESEMPEÑO,CEPA,sum),
MEDIA = tapply(DESEMPEÑO,CEPA,mean),
VARIANZA = tapply(DESEMPEÑO,CEPA,var)
)
EST.CEPA
TOTAL MEDIA VARIANZA
BRILLANTE 653 40.8125 806.4292
MEZCLA 1083 67.6875 1253.6958
TORPE 1413 88.3125 1826.7625
plot(DESEMPEÑO ~ CEPA)
INTERRACCION = data.frame(
TOTAL = tapply(DESEMPEÑO,AMBIENTE:CEPA,sum),
MEDIA = tapply(DESEMPEÑO,AMBIENTE:CEPA,mean),
VARIANZA = tapply(DESEMPEÑO,AMBIENTE:CEPA,var)
)
INTERRACCION
TOTAL MEDIA VARIANZA
Libre:BRILLANTE 242 30.250 576.7857
Libre:MEZCLA 363 45.375 614.8393
Libre:TORPE 547 68.375 1341.1250
Restringido:BRILLANTE 411 51.375 896.2679
Restringido:MEZCLA 720 90.000 933.7143
Restringido:TORPE 866 108.250 1664.7857
boxplot(DESEMPEÑO ~ AMBIENTE:CEPA, range=1.5)
Prueba de normalidad de los errores.
Nos presenta una gráfica de los Cuantiles vs. Los residuales, para verificar que los
puntos en la nube se encuentran muy cerca de la línea de regresión. Esto nos
dará una sospecha de si los errores se distribuyen normal o no.
Mod_Lin = aov(DESEMPEÑO ~ AMBIENTE + CEPA + AMBIENTE:CEPA)
Residuales = rstandard(Mod_Lin)
qqnorm(Residuales, ylab = "residuales")
qqline(Residuales)
shapiro.test(Residuales) # shapiro-wilk
data: Residuales
W = 0.98128, p-value = 0.6328
Prueba de homogeneidad de varianzas.
Se graficaran la variable respuesta vs. Los residuales y los Valores ajustados vs.
Los residuales, para verificar que no se presenta ningún patrón especifico en la
nueve de puntos. Esto nos indicará y nos dará sospechas de si hay independencia
en los errores y homogeneidad de varianzas respectivamente.
par(mfrow = c(1,2))
plot(DESEMPEÑO, Residuales)
abline(h=0)
valores.ajustados = fitted(Mod_Lin)
plot(valores.ajustados, Residuales)
abline(h=0)
bartlett.test(DESEMPEÑO, AMBIENTE:CEPA)
Ho = tj = 0, Ɐij
H1 = tj ≠ 0, Ǝij
ANAVA = summary(Mod_Lin)
ANAVA
Df Sum Sq Mean Sq F value Pr(>F)
AMBIENTE 1 14876 14876 14.808 0.000399 ***
CEPA 2 18154 9077 9.036 0.000545 ***
AMBIENTE:CEPA 2 1235 618 0.615 0.545563
Residuals 42 42193 1005
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Prueba de comparaciones.
TukeyHSD(Mod_Lin)
Tukey multiple comparisons of means
95% family-wise confidence level
$`AMBIENTE`
diff lwr upr p adj
Restringido-Libre 35.20833 16.74365 53.67301 0.0003988
$CEPA
diff lwr upr p adj
MEZCLA-BRILLANTE 26.875 -0.3497827 54.09978 0.0536685
TORPE-BRILLANTE 47.500 20.2752173 74.72478 0.0003483
TORPE-MEZCLA 20.625 -6.5997827 47.84978 0.1689882
$`AMBIENTE:CEPA`
diff lwr
upr p adj
Restringido:BRILLANTE-Libre:BRILLANTE 21.125 -26.184044
68.43404 0.7652140
Libre:MEZCLA-Libre:BRILLANTE 15.125 -32.184044
62.43404 0.9295164
Restringido:MEZCLA-Libre:BRILLANTE 59.750 12.440956
107.05904 0.0062657
Libre:TORPE-Libre:BRILLANTE 38.125 -9.184044
85.43404 0.1775986
Restringido:TORPE-Libre:BRILLANTE 78.000 30.690956
125.30904 0.0001893
Libre:MEZCLA-Restringido:BRILLANTE -6.000 -53.309044
41.30904 0.9989127
Restringido:MEZCLA-Restringido:BRILLANTE 38.625 -8.684044
85.93404 0.1669762
Libre:TORPE-Restringido:BRILLANTE 17.000 -30.309044
64.30904 0.8893865
Restringido:TORPE-Restringido:BRILLANTE 56.875 9.565956
104.18404 0.0104237
Restringido:MEZCLA-Libre:MEZCLA 44.625 -2.684044
91.93404 0.0744441
Libre:TORPE-Libre:MEZCLA 23.000 -24.309044
70.30904 0.6960457
Restringido:TORPE-Libre:MEZCLA 62.875 15.565956
110.18404 0.0035460
Libre:TORPE-Restringido:MEZCLA -21.625 -68.934044
25.68404 0.7473635
Restringido:TORPE-Restringido:MEZCLA 18.250 -29.059044
65.55904 0.8566727
Restringido:TORPE-Libre:TORPE 39.875 -7.434044
87.18404 0.1425480
Gráfico de interacción:
library(ggplot2)
CEPAS = rep(c("BRILLANTE","MEZCLA","TORPE"), 3)
PROMEDIO = as.vector(INTERRACCION$MEDIA)
LUGAR = factor(rep(1:2, each=2),
labels = c("Libre", "Restringido"))
ggplot(INTERRACCION, aes(x="CEPAS", y="PROMEDIO",
colour="LUGAR"))+
geom_line(linetype = "dashed")+
geom_point(shape=22, size=3, fill="white")
CONCLUSIONES.