BASE DE DATOS DE PINUS GREGGII DE AMBAS LOCALIDADES DE INVESTIGACI?N.
ANOVAS POR VARIABLES
ANOVA EN ALTURA #ANALISIS EN MZ
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)
SNAMZ<- OMZ1[which(!is.na(OMZ1$H14)),] #Eliminar NA
tapply(SNAMZ$H14,list(SNAMZ$procedencia,SNAMZ$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 9.333333 NA 10.000000 9.000000 11.166667 10.333333 4.666667
## EMQ 10.666667 NA 8.333333 4.833333 12.000000 3.666667 10.166667
## EPH 7.500000 5.833333 8.750000 8.250000 10.333333 3.100000 9.333333
## GNL 7.000000 NA 6.500000 2.700000 1.733333 6.666667 4.200000
## JC 11.000000 7.750000 2.600000 8.000000 4.500000 3.466667 3.800000
## LAH NA 6.100000 4.000000 8.500000 6.000000 5.000000 6.166667
## LLC 8.500000 NA 6.750000 5.166667 2.266667 4.500000 3.400000
## MH 11.500000 11.333333 7.333333 9.000000 3.300000 8.000000 NA
## PLCC 6.250000 8.500000 5.500000 3.700000 5.500000 4.066667 5.500000
## PSJC 5.333333 4.800000 5.166667 9.500000 3.966667 10.500000 3.500000
## SAC 9.666667 6.666667 NA NA 8.250000 10.000000 7.333333
## TLQ 10.000000 6.833333 7.000000 3.166667 2.800000 11.166667 9.333333
## XH 8.666667 5.500000 7.000000 NA 9.750000 5.333333 7.000000
## 8 9 10 11 12
## CDZH 4.600000 9.833333 7.500000 4.033333 11.250000
## EMQ 11.166667 9.833333 11.166667 5.833333 11.500000
## EPH 4.500000 11.000000 11.000000 6.833333 11.333333
## GNL 7.833333 7.250000 4.133333 3.166667 9.666667
## JC 8.166667 8.666667 8.166667 7.333333 8.833333
## LAH 9.500000 3.800000 8.666667 8.166667 7.333333
## LLC 5.750000 3.200000 10.000000 2.883333 7.000000
## MH 9.333333 9.000000 9.000000 4.633333 6.000000
## PLCC 4.500000 8.666667 6.833333 5.500000 6.333333
## PSJC 8.000000 7.833333 11.000000 7.250000 9.500000
## SAC 7.500000 8.000000 9.500000 3.666667 8.500000
## TLQ 6.500000 7.750000 9.500000 3.300000 10.166667
## XH 2.566667 9.333333 8.250000 6.833333 7.750000
#promedios de las procedencias
prom.proc.MZG <- with(OMZ1, data.frame(
procedencia = sort (unique(procedencia)),
h.prom = tapply(H14, procedencia, mean, na.rm = T),
db.prom= tapply(DB14, procedencia, mean, na.rm = T),
dap.prom = tapply(DAP14, procedencia, mean, na.rm = T),
dc.prom = tapply(DC14, procedencia, mean, na.rm = T),
ac.prom = tapply(AC14, procedencia, mean, na.rm = T)
)
)
#Para crear graficos de interaccion, siguiente funcion y esta libreria
library(graphics)
with(SNAMZ, {
interaction.plot(procedencia, bloque, H14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(H14, procedencia, mean)))
interaction.plot(bloque, procedencia,H14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Magdalena Zahuatlán")
}
)
library(agricolae)
## Warning: package 'agricolae' was built under R version 3.1.3
SNAMZ$bloque= factor(SNAMZ$bloque)
modelo<-aov(H14~bloque*procedencia,data=SNAMZ)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 582.1 52.92 23.627 <2e-16 ***
## procedencia 12 403.8 33.65 15.025 <2e-16 ***
## bloque:procedencia 123 1548.6 12.59 5.622 <2e-16 ***
## Residuals 228 510.6 2.24
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 7.181733 20.83819 2.239642 1.321595 28.75248
##
## $parameters
## Df ntr StudentizedRange
## 228 13 4.735293
##
## $means
## H14 std r Min Max
## CDZH 8.100000 2.844544 29 3.1 12.0
## EMQ 8.822581 3.078280 31 3.0 13.5
## EPH 8.353125 3.111683 32 1.2 13.0
## GNL 5.486667 2.704879 30 1.0 10.5
## JC 6.487097 2.674664 31 2.1 11.0
## LAH 6.829630 2.057970 27 3.1 10.0
## LLC 5.505769 2.776917 26 1.8 12.5
## MH 8.082143 2.917388 28 2.4 12.5
## PLCC 5.957143 2.036778 28 2.1 9.0
## PSJC 7.078571 2.692425 28 2.9 12.0
## SAC 7.821429 2.318262 28 3.5 13.0
## TLQ 7.524138 3.105025 29 1.1 12.0
## XH 6.989286 2.289968 28 1.8 11.0
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 8.822581 a
## 2 EPH 8.353125 ab
## 3 CDZH 8.100000 abc
## 4 MH 8.082143 abc
## 5 SAC 7.821429 abc
## 6 TLQ 7.524138 bcd
## 7 PSJC 7.078571 bcde
## 8 XH 6.989286 cde
## 9 LAH 6.829630 cdef
## 10 JC 6.487097 defg
## 11 PLCC 5.957143 efg
## 12 LLC 5.505769 fg
## 13 GNL 5.486667 g
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,12),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,10),bar=FALSE,col="green",space=1,main="Error",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,15),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,10),density=20,col="black",main="Grupos",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
#ANALISIS DE TP
OTP1<-read.csv("C:/LUGO/GRETP.csv", header=T)
SNATP<- OTP1[which(!is.na(OTP1$H14)),] #Eliminar NA
tapply(SNATP$H14,list(SNATP$procedencia,SNATP$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 10.900000 11.050000 11.666667 11.666667 12.833333 12.500000 13.000000
## EMQ 11.350000 12.633333 11.500000 12.500000 14.166667 13.500000 13.166667
## EPH 11.666667 12.000000 12.333333 11.833333 13.500000 13.166667 13.666667
## GNL 9.333333 8.000000 8.833333 10.333333 9.000000 8.333333 8.750000
## JC 7.733333 8.500000 9.000000 9.500000 9.333333 10.166667 9.833333
## LAH 11.833333 10.833333 10.333333 11.000000 10.833333 12.166667 9.500000
## LLC 8.166667 9.000000 6.500000 9.666667 9.833333 8.666667 8.500000
## MH 11.733333 9.716667 11.000000 11.833333 9.750000 11.000000 11.000000
## PLCC 10.233333 8.166667 8.166667 8.333333 9.166667 8.750000 8.333333
## PSJC 6.566667 9.966667 7.500000 12.833333 10.500000 11.666667 11.833333
## SAC 9.666667 10.166667 9.000000 9.500000 9.166667 8.500000 9.666667
## TLQ 11.433333 11.666667 12.166667 12.833333 12.166667 10.166667 12.500000
## XH 10.500000 12.833333 10.000000 9.666667 11.500000 10.666667 11.000000
## 8 9 10 11 12
## CDZH 11.500000 12.000000 10.833333 12.333333 12.000000
## EMQ 13.833333 12.833333 13.666667 13.000000 13.000000
## EPH 14.500000 13.000000 11.333333 9.333333 12.000000
## GNL 8.750000 7.750000 9.833333 9.500000 6.666667
## JC 8.666667 8.500000 8.750000 9.166667 7.833333
## LAH 11.500000 10.833333 12.666667 11.166667 11.166667
## LLC 9.000000 8.333333 8.000000 8.333333 9.500000
## MH 11.500000 11.333333 12.000000 10.166667 13.000000
## PLCC 10.000000 9.333333 7.666667 8.666667 7.833333
## PSJC 11.000000 10.000000 12.000000 10.500000 8.666667
## SAC 10.500000 9.000000 9.500000 8.000000 7.000000
## TLQ 10.000000 12.333333 9.666667 12.166667 12.166667
## XH 12.000000 9.000000 12.333333 10.666667 11.666667
#Promedio por procedencia
prom.proc.TPG <- with(OTP1, data.frame(
procedencia = sort (unique(procedencia)),
h.prom = tapply(H14, procedencia, mean, na.rm = T),
db.prom= tapply(DB14, procedencia, mean, na.rm = T),
dap.prom = tapply(DAP14, procedencia, mean, na.rm = T),
dc.prom = tapply(DC14, procedencia, mean, na.rm = T),
ac.prom = tapply(AC14, procedencia, mean, na.rm = T)
)
)
library(graphics)
with(SNATP, {
interaction.plot(procedencia, bloque, H14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(H14, procedencia, mean)))
interaction.plot(bloque, procedencia,H14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Tlacotepec Plumas")
})
library(agricolae)
SNATP$bloque= factor(SNATP$bloque)
modelo <- aov(H14~bloque*procedencia, data=SNATP)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 66.3 6.03 2.258 0.0119 *
## procedencia 12 927.6 77.30 28.972 <2e-16 ***
## bloque:procedencia 132 397.6 3.01 1.129 0.2004
## Residuals 289 771.1 2.67
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 10.50809 15.54446 2.66808 1.319569 34.2035
##
## $parameters
## Df ntr StudentizedRange
## 289 13 4.724631
##
## $means
## H14 std r Min Max
## CDZH 11.852857 1.3061474 35 8.5 14.5
## EMQ 12.973529 1.1122755 34 9.5 14.5
## EPH 12.235294 2.2061735 34 5.0 16.0
## GNL 8.787879 1.6537377 33 6.0 13.5
## JC 8.932353 0.9959678 34 7.0 11.5
## LAH 11.200000 1.5586570 35 8.0 14.5
## LLC 8.647059 1.5400188 34 3.0 13.0
## MH 11.201471 1.4494767 34 8.0 14.0
## PLCC 8.682353 1.0373248 34 7.0 10.5
## PSJC 10.252778 2.7941251 36 4.5 15.5
## SAC 9.075758 1.4258836 33 5.0 13.5
## TLQ 11.605556 1.8306821 36 6.5 14.0
## XH 10.969697 1.9642882 33 5.0 14.5
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 12.973529 a
## 2 EPH 12.235294 ab
## 3 CDZH 11.852857 ab
## 4 TLQ 11.605556 b
## 5 MH 11.201471 bc
## 6 LAH 11.200000 bc
## 7 XH 10.969697 bc
## 8 PSJC 10.252778 cd
## 9 SAC 9.075758 de
## 10 JC 8.932353 e
## 11 GNL 8.787879 e
## 12 PLCC 8.682353 e
## 13 LLC 8.647059 e
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,15),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,15),bar=FALSE,col="green",space=1,main="Error",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,20),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,15),density=20,col="black",main="Grupos",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
#ANALSIS DE LOS DOS GRUPOS EN CONJUNTO
PO<-read.csv("C:/LUGO/gregtod.csv", header=T)
#promedios de las procedencias
prom.procG <- with(PO, data.frame(
procedencia = sort (unique(procedencia)),
h.prom = tapply(H14, procedencia, mean, na.rm = T),
db.prom= tapply(DB14, procedencia, mean, na.rm = T),
dap.prom = tapply(DAP14, procedencia, mean, na.rm = T),
dc.prom = tapply(DC14, procedencia, mean, na.rm = T),
ac.prom = tapply(AC14, procedencia, mean, na.rm = T)
)
)
#promedios de las localidades
prom.locG <- with(PO, data.frame(
Localidad = sort (unique(Localidad)),
h.prom = tapply(H14, Localidad, mean, na.rm = T),
db.prom= tapply(DB14, Localidad, mean, na.rm = T),
dap.prom = tapply(DAP14, Localidad, mean, na.rm = T),
dc.prom = tapply(DC14, Localidad, mean, na.rm = T),
ac.prom = tapply(AC14, Localidad, mean, na.rm = T)
)
)
POH<- PO[which(!is.na(PO$H14)),] #Eliminar NA
tapply(POH$H14,list(POH$procedencia,POH$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 10.116667 11.050000 11.250000 10.600000 12.000000 11.416667 8.833333
## EMQ 10.940000 12.633333 9.916667 8.666667 13.625000 8.583333 11.666667
## EPH 9.583333 8.916667 10.900000 10.400000 11.916667 8.133333 11.500000
## GNL 8.166667 8.000000 7.900000 6.516667 5.366667 7.500000 6.475000
## JC 8.550000 8.200000 5.800000 9.125000 6.916667 6.816667 6.816667
## LAH 11.833333 8.466667 7.166667 9.750000 9.625000 10.375000 7.500000
## LLC 8.333333 9.000000 6.600000 7.416667 6.050000 7.625000 5.950000
## MH 11.616667 10.525000 9.166667 10.416667 5.880000 9.500000 11.000000
## PLCC 8.640000 8.300000 7.500000 6.016667 7.333333 5.940000 7.625000
## PSJC 5.950000 8.675000 6.333333 12.000000 7.233333 11.200000 8.500000
## SAC 9.666667 8.416667 9.000000 9.500000 8.800000 9.250000 8.500000
## TLQ 10.860000 9.250000 10.875000 8.000000 8.420000 10.666667 10.916667
## XH 9.400000 9.900000 8.500000 9.666667 10.800000 8.000000 9.000000
## 8 9 10 11 12
## CDZH 8.050000 10.916667 9.166667 8.183333 11.625000
## EMQ 12.500000 11.333333 12.416667 9.416667 12.100000
## EPH 9.500000 12.000000 11.166667 8.083333 11.666667
## GNL 8.200000 7.500000 6.983333 6.333333 8.166667
## JC 8.416667 8.600000 8.400000 8.250000 8.333333
## LAH 10.700000 8.020000 10.666667 9.666667 9.250000
## LLC 7.700000 6.280000 9.200000 5.608333 8.500000
## MH 10.200000 10.400000 11.250000 7.400000 11.250000
## PLCC 8.166667 9.000000 7.250000 7.083333 7.083333
## PSJC 9.500000 8.916667 11.600000 9.200000 9.083333
## SAC 8.250000 8.500000 9.500000 5.833333 7.750000
## TLQ 8.600000 10.500000 9.583333 8.620000 11.166667
## XH 6.340000 9.166667 10.700000 8.750000 10.100000
library(graphics)
with(POH, {
interaction.plot(procedencia, Localidad, H14, col=1:2,cex.axis=.8,cex.lab=1.5,cex.main=1.5,lty = 1,lwd=2,main="a) Interaction of the localities evaluated")
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(H14, procedencia, mean)))
interaction.plot(Localidad, procedencia,H14, col = 1:8,cex.axis=1,cex.lab=1.5,cex.main=1.5,lwd=2,lty = 1,main="b) Interaction of the provenances in the two localities")
})
library(agricolae)
POH$bloque= factor(POH$bloque)
modelo <- aov(H14~Localidad+procedencia+bloque+Localidad:procedencia+Localidad:bloque+procedencia:bloque+Localidad:procedencia:bloque, data=POH)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## Localidad 1 2251.7 2251.7 908.269 < 2e-16 ***
## procedencia 12 1212.4 101.0 40.755 < 2e-16 ***
## bloque 11 260.2 23.7 9.540 9.37e-16 ***
## Localidad:procedencia 12 130.6 10.9 4.390 1.08e-06 ***
## Localidad:bloque 11 376.6 34.2 13.809 < 2e-16 ***
## procedencia:bloque 132 944.9 7.2 2.887 < 2e-16 ***
## Localidad:procedencia:bloque 123 1001.4 8.1 3.284 < 2e-16 ***
## Residuals 517 1281.7 2.5
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 8.98689 17.52027 2.479136 0.9335725 63.02449
##
## $parameters
## Df ntr StudentizedRange
## 517 13 4.70709
##
## $means
## H14 std r Min Max
## CDZH 10.152344 2.839425 64 3.1 14.5
## EMQ 10.993846 3.073316 65 3.0 14.5
## EPH 10.353030 3.303202 66 1.2 16.0
## GNL 7.215873 2.756061 63 1.0 13.5
## JC 7.766154 2.319434 65 2.1 11.5
## LAH 9.296774 2.816344 62 3.1 14.5
## LLC 7.285833 2.656717 60 1.8 13.0
## MH 9.792742 2.711660 62 2.4 14.0
## PLCC 7.451613 2.070697 62 2.1 10.5
## PSJC 8.864062 3.156418 64 2.9 15.5
## SAC 8.500000 1.974842 61 3.5 13.5
## TLQ 9.784615 3.198644 65 1.1 14.0
## XH 9.142623 2.901290 61 1.8 14.5
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 10.993846 a
## 2 EPH 10.353030 ab
## 3 CDZH 10.152344 abc
## 4 MH 9.792742 bcd
## 5 TLQ 9.784615 bcd
## 6 LAH 9.296774 cde
## 7 XH 9.142623 de
## 8 PSJC 8.864062 de
## 9 SAC 8.500000 ef
## 10 JC 7.766154 fg
## 11 PLCC 7.451613 g
## 12 LLC 7.285833 g
## 13 GNL 7.215873 g
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,15),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,12),bar=FALSE,col="green",space=1,main="Error",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,20),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,15),density=20,col="black",main="Grupos",ylab="Altura (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
boxplot(POH$H14 ~ POH$Localidad, xlab = "Localidad", ylab = "Altura (m)")
ANOVA DEL DIAMETRO BASAL
OMZ1<-read.csv("C:/LUGO/GREMZ.csv",header=T)
SNAMZ<- OMZ1[which(!is.na(OMZ1$DB14)),] #Eliminar NA
tapply(SNAMZ$DB14,list(SNAMZ$procedencia,SNAMZ$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 20.26333 NA 25.150000 17.345000 19.206667 20.690000 9.656667
## EMQ 20.16000 NA 16.553333 6.896667 18.460000 10.610000 19.526667
## EPH 24.83000 8.593333 21.325000 24.350000 24.720000 4.033333 14.956667
## GNL 15.49333 NA 11.145000 5.833333 4.986667 17.720000 10.345000
## JC 23.55000 19.895000 5.093333 16.230000 10.293333 9.336667 9.123333
## LAH NA 6.900000 9.763333 18.460000 9.550000 9.870000 15.386667
## LLC 15.49000 NA 14.640000 8.803333 7.320000 14.640000 7.640000
## MH 24.82667 24.300000 15.490000 19.310000 7.533333 17.080000 NA
## PLCC 11.14000 15.280000 14.010000 6.790000 13.790000 10.396667 8.280000
## PSJC 10.61000 9.550000 8.170000 20.690000 8.803333 20.690000 9.230000
## SAC 14.30667 11.246667 NA NA 13.370000 18.940000 9.973333
## TLQ 17.34500 11.350000 12.730000 7.640000 7.800000 17.403333 15.703333
## XH 19.41667 11.780000 15.170000 NA 14.165000 15.386667 9.230000
## 8 9 10 11 12
## CDZH 8.910000 22.49333 14.64333 7.953333 19.41500
## EMQ 22.920000 16.66000 16.55333 10.076667 16.44333
## EPH 10.820000 23.87000 19.94667 14.216667 20.48000
## GNL 15.810000 13.68500 7.96000 9.443333 17.72000
## JC 15.596667 15.59667 16.23667 21.113333 17.93333
## LAH 16.075000 8.59000 17.82667 14.750000 10.50333
## LLC 12.095000 6.36500 17.19000 6.580000 14.00500
## MH 18.040000 17.66500 18.46000 5.516667 9.55000
## PLCC 13.370000 15.81000 15.49000 13.686667 10.08333
## PSJC 11.990000 12.62667 22.60000 12.415000 19.52667
## SAC 11.780000 14.85333 14.96000 6.366667 13.90333
## TLQ 13.210000 9.39000 22.28000 4.935000 17.61000
## XH 6.843333 17.29667 12.73500 12.410000 13.05000
library(graphics)
with(SNAMZ, {
interaction.plot(procedencia, bloque, DB14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DB14, procedencia, mean)))
interaction.plot(bloque, procedencia,DB14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Magdalena Zahuatlán")
})
library(agricolae)
SNAMZ$bloque= factor(SNAMZ$bloque)
modelo <- aov(DB14~bloque*procedencia,data=SNAMZ)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 1592 144.70 9.079 2.06e-13 ***
## procedencia 12 1401 116.76 7.326 2.45e-11 ***
## bloque:procedencia 123 7014 57.02 3.578 < 2e-16 ***
## Residuals 228 3634 15.94
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 14.07032 28.37284 15.93726 3.525462 28.75248
##
## $parameters
## Df ntr StudentizedRange
## 228 13 4.735293
##
## $means
## DB14 std r Min Max
## CDZH 16.21103 6.432142 29 4.77 28.33
## EMQ 15.73097 5.857147 31 5.09 25.15
## EPH 17.78469 8.532520 32 2.55 31.51
## GNL 11.84167 5.200204 30 3.18 22.60
## JC 14.21097 5.591341 31 4.14 23.55
## LAH 12.94519 4.899773 27 4.14 21.96
## LLC 11.16462 4.807489 26 3.82 22.60
## MH 16.41536 7.422172 28 3.50 30.56
## PLCC 12.38000 4.173351 28 5.09 20.05
## PSJC 13.40321 6.049055 28 7.00 31.51
## SAC 12.74250 4.614856 28 3.50 21.65
## TLQ 13.58793 5.685673 29 4.14 24.51
## XH 13.62464 4.191416 28 4.77 21.65
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 17.78469 a
## 2 MH 16.41536 ab
## 3 CDZH 16.21103 abc
## 4 EMQ 15.73097 abcd
## 5 JC 14.21097 bcde
## 6 XH 13.62464 bcde
## 7 TLQ 13.58793 bcde
## 8 PSJC 13.40321 bcde
## 9 LAH 12.94519 bcde
## 10 SAC 12.74250 cde
## 11 PLCC 12.38000 de
## 12 GNL 11.84167 e
## 13 LLC 11.16462 e
par(mfrow=c(1,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,20),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,35),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,20),density=20,col="black",main="Grupos",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
#ANALISIS DE TP
OTP1<-read.csv("C:/LUGO/GRETP.csv", header=T)
SNATP<- OTP1[which(!is.na(OTP1$DB14)),] #Eliminar NA
tapply(SNATP$H14,list(SNATP$procedencia,SNATP$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 10.900000 11.050000 11.666667 11.666667 12.833333 12.500000 13.000000
## EMQ 11.350000 12.633333 11.500000 12.500000 14.166667 13.500000 13.166667
## EPH 11.666667 12.000000 12.333333 11.833333 13.500000 13.166667 13.666667
## GNL 9.333333 8.000000 8.833333 10.333333 9.000000 8.333333 8.750000
## JC 7.733333 8.500000 9.000000 9.500000 9.333333 10.166667 9.833333
## LAH 11.833333 10.833333 10.333333 11.000000 10.833333 12.166667 9.500000
## LLC 8.166667 9.000000 6.500000 9.666667 9.833333 8.666667 8.500000
## MH 11.733333 9.716667 11.000000 11.833333 9.750000 11.000000 11.000000
## PLCC 10.233333 8.166667 8.166667 8.333333 9.166667 8.750000 8.333333
## PSJC 6.566667 9.966667 7.500000 12.833333 10.500000 11.666667 11.833333
## SAC 9.666667 10.166667 9.000000 9.500000 9.166667 8.500000 9.666667
## TLQ 11.433333 11.666667 12.166667 12.833333 12.166667 10.166667 12.500000
## XH 10.500000 12.833333 10.000000 9.666667 11.500000 10.666667 11.000000
## 8 9 10 11 12
## CDZH 11.500000 12.000000 10.833333 12.333333 12.000000
## EMQ 13.833333 12.833333 13.666667 13.000000 13.000000
## EPH 14.500000 13.000000 11.333333 9.333333 12.000000
## GNL 8.750000 7.750000 9.833333 9.500000 6.666667
## JC 8.666667 8.500000 8.750000 9.166667 7.833333
## LAH 11.500000 10.833333 12.666667 11.166667 11.166667
## LLC 9.000000 8.333333 8.000000 8.333333 9.500000
## MH 11.500000 11.333333 12.000000 10.166667 13.000000
## PLCC 10.000000 9.333333 7.666667 8.666667 7.833333
## PSJC 11.000000 10.000000 12.000000 10.500000 8.666667
## SAC 10.500000 9.000000 9.500000 8.000000 7.000000
## TLQ 10.000000 12.333333 9.666667 12.166667 12.166667
## XH 12.000000 9.000000 12.333333 10.666667 11.666667
library(graphics)
with(SNATP, {
interaction.plot(procedencia, bloque, DB14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DB14, procedencia, mean)))
interaction.plot(bloque, procedencia,DB14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Tlacotepec Plumas")
})
library(agricolae)
SNATP$bloque= factor(SNATP$bloque)
modelo <- aov(DB14~bloque*procedencia, data=SNATP)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 254 23.1 1.034 0.416
## procedencia 12 4295 357.9 16.040 <2e-16 ***
## bloque:procedencia 132 2359 17.9 0.801 0.927
## Residuals 289 6448 22.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 18.28739 25.83017 22.313 3.816029 34.2035
##
## $parameters
## Df ntr StudentizedRange
## 289 13 4.724631
##
## $means
## DB14 std r Min Max
## CDZH 21.91229 4.664748 35 12.41 31.83
## EMQ 22.04794 3.727286 34 15.28 31.19
## EPH 22.74088 4.858371 34 11.78 32.15
## GNL 15.77152 4.220940 33 8.91 27.06
## JC 14.60412 3.071909 34 8.91 20.05
## LAH 19.38914 4.541327 35 11.14 25.78
## LLC 13.90294 3.402411 34 6.37 22.28
## MH 20.55029 4.618767 34 12.10 32.79
## PLCC 14.24029 2.948870 34 9.55 23.55
## PSJC 18.40278 7.816393 36 8.28 32.15
## SAC 14.50788 2.336828 33 10.19 19.74
## TLQ 19.83222 5.542006 36 8.28 29.92
## XH 19.44606 4.746533 33 8.28 28.65
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 22.74088 a
## 2 EMQ 22.04794 ab
## 3 CDZH 21.91229 ab
## 4 MH 20.55029 ab
## 5 TLQ 19.83222 ab
## 6 XH 19.44606 abc
## 7 LAH 19.38914 abc
## 8 PSJC 18.40278 bc
## 9 GNL 15.77152 cd
## 10 JC 14.60412 d
## 11 SAC 14.50788 d
## 12 PLCC 14.24029 d
## 13 LLC 13.90294 d
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="green",space=0.5,main="Error",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,35),bar=FALSE,col="blue", space=0.5,main="Rangos de valores = Max - Min",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,30),density=20,col="black",main="Grupos",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
PO<-read.csv("C:/LUGO/gregtod.csv", header=T)
POH<- PO[which(!is.na(PO$DB14)),] #Eliminar NA
tapply(POH$DB14,list(POH$procedencia,POH$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 18.24833 22.43000 26.260000 18.58800 20.69167 22.76000 18.25000
## EMQ 21.77400 22.60000 19.788333 12.99667 20.53000 16.55333 20.90333
## EPH 24.24500 17.50667 23.810000 19.22600 23.18333 12.62667 19.30833
## GNL 16.76500 16.02333 14.326000 10.39667 10.08000 15.22667 12.49250
## JC 16.62750 15.34200 9.708333 14.96000 12.36167 13.21000 13.15500
## LAH 23.23333 12.94667 14.536667 17.55833 14.96000 17.90500 16.10600
## LLC 17.40000 10.29333 13.050000 10.87333 11.46000 13.52750 11.30250
## MH 23.60667 23.34333 18.513333 18.94000 11.96800 17.77167 19.42000
## PLCC 12.98800 15.59800 14.247500 10.34500 14.32167 11.71400 12.41500
## PSJC 12.62500 15.99500 9.815000 24.43000 12.99833 21.32600 13.38600
## SAC 15.48333 11.88333 14.750000 14.53333 13.75200 16.55250 12.41500
## TLQ 19.35200 15.96667 19.100000 13.31667 13.68800 19.15333 18.30167
## XH 21.13600 17.82600 16.708333 19.41667 14.96000 16.07500 14.40500
## 8 9 10 11 12
## CDZH 14.69333 22.44000 17.40167 13.366667 21.16750
## EMQ 23.18500 17.29667 20.00167 14.746667 21.13400
## EPH 20.85000 23.55333 23.71500 17.135000 19.63000
## GNL 15.53400 13.68500 13.90167 13.530000 15.70500
## JC 14.64167 15.78800 16.74400 16.763333 15.38667
## LAH 17.50800 14.45200 19.36500 16.765000 16.60333
## LLC 13.49600 10.12200 17.06200 9.496667 13.75000
## MH 19.99200 19.48000 19.10000 12.148333 20.13500
## PLCC 15.70333 15.43833 13.84667 13.315000 11.99167
## PSJC 16.87167 14.37667 23.81000 15.406000 17.72167
## SAC 12.73500 15.22333 15.54500 9.816667 13.26500
## TLQ 14.96000 16.55200 19.78667 13.814000 20.10500
## XH 12.06400 18.99500 15.91800 16.178333 18.01600
library(graphics)
with(POH, {
interaction.plot(procedencia, Localidad, DB14, col=1:2,cex.axis=.8,cex.lab=1.5,cex.main=1.5,lty = 1,lwd=2,main="a) Interaction of the localities evaluated")
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DB14, procedencia, mean)))
interaction.plot(Localidad, procedencia,DB14, col = 1:8,cex.axis=1,cex.lab=1.5,cex.main=1.5,lwd=2,lty = 1,main="b) Interaction of the provenances in the two localities")
})
library(agricolae)
POH$bloque= factor(POH$bloque)
modelo <- aov(DB14~Localidad+procedencia+bloque+Localidad:procedencia+Localidad:bloque+procedencia:bloque+Localidad:procedencia:bloque,data=POH)
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## Localidad 1 3619 3619 185.583 < 2e-16 ***
## procedencia 12 4933 411 21.082 < 2e-16 ***
## bloque 11 1337 122 6.233 1.11e-09 ***
## Localidad:procedencia 12 755 63 3.224 0.000174 ***
## Localidad:bloque 11 516 47 2.407 0.006402 **
## procedencia:bloque 132 4864 37 1.889 4.47e-07 ***
## Localidad:procedencia:bloque 123 4509 37 1.880 1.00e-06 ***
## Residuals 517 10082 20
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 16.35885 26.9947 19.50126 2.618359 63.02449
##
## $parameters
## Df ntr StudentizedRange
## 517 13 4.70709
##
## $means
## DB14 std r Min Max
## CDZH 19.32891 6.189804 64 4.77 31.83
## EMQ 19.03523 5.775357 65 5.09 31.19
## EPH 20.33788 7.275646 66 2.55 32.15
## GNL 13.90016 5.075290 63 3.18 27.06
## JC 14.41662 4.422612 65 4.14 23.55
## LAH 16.58290 5.666007 62 4.14 25.78
## LLC 12.71633 4.259181 60 3.82 22.60
## MH 18.68290 6.342564 62 3.50 32.79
## PLCC 13.40016 3.644794 62 5.09 23.55
## PSJC 16.21547 7.474826 64 7.00 32.15
## SAC 13.69754 3.644560 61 3.50 21.65
## TLQ 17.04631 6.381608 65 4.14 29.92
## XH 16.77393 5.336377 61 4.77 28.65
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 20.33788 a
## 2 CDZH 19.32891 ab
## 3 EMQ 19.03523 abc
## 4 MH 18.68290 abcd
## 5 TLQ 17.04631 bcd
## 6 XH 16.77393 bcde
## 7 LAH 16.58290 cde
## 8 PSJC 16.21547 def
## 9 JC 14.41662 efg
## 10 GNL 13.90016 fg
## 11 SAC 13.69754 fg
## 12 PLCC 13.40016 g
## 13 LLC 12.71633 g
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,35),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,25),density=20,col="black",main="Grupos",ylab="Diámetro Basal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
boxplot(POH$DB14 ~ POH$Localidad, xlab = "Localidad", ylab = "Diámetro Basal (cm)")
ANOVA DEL DIAMETRO NORMAL
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)
SNAMZ<- OMZ1[which(!is.na(OMZ1$DAP14)),] #Eliminar NA
tapply(SNAMZ$DAP14,list(SNAMZ$procedencia,SNAMZ$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6
## CDZH 17.190000 NA 19.420000 13.530000 15.8100000 15.600000
## EMQ 14.536667 NA 12.413333 4.140000 14.9600000 7.956667
## EPH 20.580000 5.943333 15.595000 17.350000 19.8400000 2.016667
## GNL 12.520000 NA 8.120000 3.286667 0.9566667 13.370000
## JC 18.780000 16.235000 3.080000 14.320000 6.0500000 4.880000
## LAH NA 4.986667 5.090000 14.536667 7.0000000 8.280000
## LLC 13.263333 NA 11.460000 6.576667 3.8733333 7.640000
## MH 20.476667 19.310000 11.670000 15.280000 3.8200000 13.156667
## PLCC 7.480000 12.100000 10.500000 3.180000 9.7633333 6.793333
## PSJC 6.683333 8.280000 4.776667 16.550000 3.9233333 17.350000
## SAC 10.623333 9.020000 NA NA 11.1450000 16.870000
## TLQ 15.120000 7.853333 7.640000 4.986667 2.5500000 13.053333
## XH 15.600000 6.525000 11.036667 NA 9.8650000 7.853333
## 7 8 9 10 11 12
## CDZH 6.473333 5.516667 17.40000 12.095000 3.713333 16.390000
## EMQ 14.643333 17.826667 12.73000 13.690000 7.426667 13.160000
## EPH 11.036667 6.050000 19.73667 17.613333 10.080000 17.296667
## GNL 6.605000 13.050000 10.50500 5.093333 4.986667 14.323333
## JC 6.206667 12.096667 13.15667 12.733333 18.570000 14.960000
## LAH 10.290000 12.575000 4.93500 14.323333 11.456667 7.743333
## LLC 5.730000 8.275000 4.13500 15.700000 2.970000 11.140000
## MH NA 14.113333 13.68500 15.600000 2.760000 7.000000
## PLCC 6.370000 7.320000 12.94333 11.883333 11.140000 7.426667
## PSJC 5.415000 10.186667 10.18333 18.935000 9.710000 16.023333
## SAC 7.746667 9.760000 11.14333 12.306667 2.270000 11.140000
## TLQ 12.836667 8.755000 6.68500 15.650000 3.025000 13.583333
## XH 6.685000 3.873333 13.05333 10.290000 9.123333 9.550000
library(graphics)
with(SNAMZ, {
interaction.plot(procedencia, bloque, DAP14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DAP14, procedencia, mean)))
interaction.plot(bloque, procedencia,DAP14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Magdalena Zahuatlán")
})
library(agricolae)
SNAMZ$bloque= factor(SNAMZ$bloque)
modelo <- aov(DAP14~bloque*procedencia,data=SNAMZ)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 1656 150.54 12.749 < 2e-16 ***
## procedencia 12 1110 92.47 7.832 3.52e-12 ***
## bloque:procedencia 123 6018 48.92 4.144 < 2e-16 ***
## Residuals 228 2692 11.81
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 10.55027 32.56956 11.8073 3.034482 28.75248
##
## $parameters
## Df ntr StudentizedRange
## 228 13 4.735293
##
## $means
## DAP14 std r Min Max
## CDZH 12.448571 5.927956 28 2.23 22.28
## EMQ 11.952581 4.856948 31 3.50 19.74
## EPH 13.886563 7.586721 32 0.64 28.01
## GNL 8.440667 5.121735 30 0.64 17.51
## JC 10.992581 5.543186 31 2.55 19.42
## LAH 9.465926 4.387266 27 2.23 17.51
## LLC 8.318077 4.955818 26 1.59 20.05
## MH 12.561786 6.665668 28 1.59 24.19
## PLCC 9.026429 4.026096 28 1.27 15.60
## PSJC 10.106429 5.898133 28 3.18 27.37
## SAC 9.930714 4.397813 28 0.76 17.19
## TLQ 9.786207 5.091661 29 0.64 19.10
## XH 9.577241 3.560534 29 2.86 17.83
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 13.886563 a
## 2 MH 12.561786 ab
## 3 CDZH 12.448571 ab
## 4 EMQ 11.952581 abc
## 5 JC 10.992581 abcd
## 6 PSJC 10.106429 bcd
## 7 SAC 9.930714 bcd
## 8 TLQ 9.786207 bcd
## 9 XH 9.577241 bcd
## 10 LAH 9.465926 bcd
## 11 PLCC 9.026429 cd
## 12 GNL 8.440667 d
## 13 LLC 8.318077 d
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro Normal (cm)",las=1,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,18),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,30),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,18),density=20,col="black",main="Grupos",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
#ANALISIS DE TP
OTP1<-read.csv("C:/LUGO/GRETP.csv", header=T)
SNATP<- OTP1[which(!is.na(OTP1$DAP14)),] #Eliminar NA
tapply(SNATP$DAP14,list(SNATP$procedencia,SNATP$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 11.99333 14.643333 20.476667 13.686667 16.55333 18.886667 22.38667
## EMQ 17.98500 17.506667 18.993333 14.963333 17.51000 17.506667 19.31333
## EPH 18.99000 21.963333 18.673333 12.310000 17.08333 16.870000 18.46333
## GNL 15.06667 12.840000 13.050000 11.456667 12.20000 9.653333 11.30000
## JC 11.67333 9.866667 11.353333 12.096667 11.35000 13.366667 13.79333
## LAH 17.40000 14.430000 13.793333 12.943333 13.58000 16.233333 13.68500
## LLC 14.42667 8.063333 7.746667 9.976667 12.84000 9.340000 12.41500
## MH 16.55333 17.823333 16.553333 14.113333 14.32500 14.326667 14.64333
## PLCC 10.71667 11.776667 11.563333 10.606667 10.71333 11.145000 10.71667
## PSJC 10.18333 14.320000 9.123333 19.420000 13.58000 17.400000 13.68667
## SAC 12.94667 9.656667 11.140000 11.990000 11.35667 10.660000 11.67000
## TLQ 12.83667 15.916667 16.020000 15.066667 12.94333 16.973333 17.19000
## XH 18.78000 16.660000 14.536667 14.856667 11.25000 13.793333 15.59500
## 8 9 10 11 12
## CDZH 15.06667 17.510000 15.81000 13.793333 17.19000
## EMQ 20.16333 14.220000 18.46333 15.916667 23.08000
## EPH 25.46000 18.143333 21.64333 14.643333 14.11333
## GNL 12.09500 10.980000 15.81333 14.536667 11.45667
## JC 10.18667 13.370000 13.69000 9.866667 10.18667
## LAH 14.85667 13.686667 18.14333 14.540000 18.67333
## LLC 11.46000 9.866667 14.16500 9.973333 11.24333
## MH 18.14500 17.403333 15.49000 14.536667 18.25000
## PLCC 14.00500 11.563333 9.23000 11.460000 10.40000
## PSJC 17.40333 13.366667 20.16000 14.853333 11.77667
## SAC 12.10000 11.353333 13.89667 10.503333 9.55000
## TLQ 12.73000 16.766667 13.47333 15.810000 18.25000
## XH 16.55000 16.763333 14.74667 14.750000 17.72000
library(graphics)
with(SNATP, {
interaction.plot(procedencia, bloque, DAP14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DAP14, procedencia, mean)))
interaction.plot(bloque, procedencia,DAP14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Tlacotepec Plumas")
})
library(agricolae)
SNATP$bloque= factor(SNATP$bloque)
modelo <- aov(DAP14~bloque*procedencia,data=SNATP)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 224 20.36 1.184 0.298
## procedencia 12 2557 213.11 12.394 <2e-16 ***
## bloque:procedencia 132 1823 13.81 0.803 0.924
## Residuals 289 4969 17.20
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 14.33762 28.92183 17.19513 3.349927 34.2035
##
## $parameters
## Df ntr StudentizedRange
## 289 13 4.724631
##
## $means
## DAP14 std r Min Max
## CDZH 16.48000 4.158214 35 7.96 26.10
## EMQ 17.81765 3.156667 34 12.10 25.15
## EPH 17.76912 4.142390 34 8.28 26.74
## GNL 12.63545 3.601629 33 5.73 21.65
## JC 11.62765 2.803769 34 6.05 16.23
## LAH 15.20600 4.315154 35 7.00 25.15
## LLC 10.82265 3.131894 34 1.91 18.14
## MH 16.00059 4.275078 34 7.96 26.74
## PLCC 11.07471 2.458252 34 6.68 18.14
## PSJC 14.60611 6.464696 36 6.68 25.78
## SAC 11.38212 2.292005 33 7.00 15.92
## TLQ 15.33139 4.887396 36 5.73 25.78
## XH 15.36606 4.358108 33 5.09 24.19
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 17.81765 a
## 2 EPH 17.76912 a
## 3 CDZH 16.48000 a
## 4 MH 16.00059 ab
## 5 XH 15.36606 ab
## 6 TLQ 15.33139 ab
## 7 LAH 15.20600 ab
## 8 PSJC 14.60611 abc
## 9 GNL 12.63545 bcd
## 10 JC 11.62765 cd
## 11 SAC 11.38212 cd
## 12 PLCC 11.07471 d
## 13 LLC 10.82265 d
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro normal (cm) ",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,20),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,30),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,22),density=20,col="black",main="Grupos",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
PO<-read.csv("C:/LUGO/gregtod.csv", header=T)
POH<- PO[which(!is.na(PO$DAP14)),] #Eliminar NA
tapply(POH$DAP14,list(POH$procedencia,POH$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 14.591667 14.643333 20.212500 13.624000 16.181667 17.243333 14.430000
## EMQ 15.916000 17.506667 15.703333 9.551667 16.872500 12.731667 16.978333
## EPH 19.785000 13.953333 17.442000 14.326000 18.461667 9.443333 14.750000
## GNL 13.793333 12.840000 11.078000 7.371667 6.578333 11.511667 8.952500
## JC 13.450000 12.414000 7.216667 12.652500 8.700000 9.123333 10.000000
## LAH 17.400000 9.708333 9.441667 13.740000 11.935000 14.245000 11.648000
## LLC 13.845000 8.063333 9.232000 8.276667 8.356667 8.915000 9.072500
## MH 18.515000 18.566667 14.111667 14.696667 8.022000 13.741667 14.643333
## PLCC 9.422000 11.906000 11.297500 6.893333 10.238333 8.534000 9.630000
## PSJC 8.433333 12.810000 6.950000 18.702500 8.751667 17.380000 10.378000
## SAC 11.785000 9.338333 11.140000 11.990000 11.272000 13.765000 9.708333
## TLQ 13.750000 11.885000 13.925000 10.026667 8.786000 15.013333 15.013333
## XH 16.872000 12.606000 12.786667 14.856667 10.696000 10.823333 11.140000
## 8 9 10 11 12
## CDZH 10.29167 17.45500 14.32400 8.753333 16.790000
## EMQ 18.99500 13.47500 16.07667 11.671667 17.128000
## EPH 15.75500 18.94000 19.62833 12.361667 15.705000
## GNL 12.66800 10.74250 10.45333 9.761667 12.890000
## JC 11.14167 13.24200 13.11600 14.218333 12.573333
## LAH 13.94400 10.18600 16.23333 12.998333 13.208333
## LLC 10.18600 7.57400 15.08600 6.471667 11.202000
## MH 15.72600 15.91600 15.51750 8.648333 15.437500
## PLCC 11.77667 12.25333 10.55667 11.300000 8.913333
## PSJC 13.79500 11.77500 19.67000 12.796000 13.900000
## SAC 10.34500 11.24833 13.10167 6.386667 10.345000
## TLQ 11.14000 12.73400 14.56167 10.696000 15.916667
## XH 8.94400 14.90833 12.51833 11.936667 14.452000
library(graphics)
with(POH, {
interaction.plot(procedencia, Localidad, DAP14, col=1:2,cex.axis=.8,cex.lab=1.5,cex.main=1.5,lty = 1,lwd=2,main="a) Interaction of the localities evaluated")
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DAP14, procedencia, mean)))
interaction.plot(Localidad, procedencia,DAP14, col = 1:8,cex.axis=1,cex.lab=1.5,cex.main=1.5,lwd=2,lty = 1,main="b) Interaction of the provenances in the two localities")
})
library(agricolae)
POH$bloque= factor(POH$bloque)
modelo <- aov(DAP14~Localidad+procedencia+bloque+Localidad:procedencia+Localidad:bloque+procedencia:bloque+Localidad:procedencia:bloque,data=POH)
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## Localidad 1 2919 2919.1 196.983 < 2e-16 ***
## procedencia 12 3072 256.0 17.278 < 2e-16 ***
## bloque 11 1255 114.1 7.696 2.23e-12 ***
## Localidad:procedencia 12 573 47.7 3.222 0.000175 ***
## Localidad:bloque 11 647 58.8 3.968 1.46e-05 ***
## procedencia:bloque 132 4152 31.5 2.123 2.27e-09 ***
## Localidad:procedencia:bloque 123 3688 30.0 2.023 4.73e-08 ***
## Residuals 517 7661 14.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 12.6056 30.53845 14.81907 2.282396 63.0295
##
## $parameters
## Df ntr StudentizedRange
## 517 13 4.70709
##
## $means
## DAP14 std r Min Max
## CDZH 14.688254 5.372418 63 2.23 26.10
## EMQ 15.020462 4.991119 65 3.50 25.15
## EPH 15.886667 6.323418 66 0.64 28.01
## GNL 10.637937 4.839922 63 0.64 21.65
## JC 11.324769 4.307994 65 2.55 19.42
## LAH 12.706290 5.178372 62 2.23 25.15
## LLC 9.737333 4.178461 60 1.59 20.05
## MH 14.447581 5.703514 62 1.59 26.74
## PLCC 10.149677 3.391151 62 1.27 18.14
## PSJC 12.637500 6.571823 64 3.18 27.37
## SAC 10.715902 3.469426 61 0.76 17.19
## TLQ 12.857385 5.667629 65 0.64 25.78
## XH 12.658387 4.925671 62 2.86 24.19
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 15.886667 a
## 2 EMQ 15.020462 ab
## 3 CDZH 14.688254 abc
## 4 MH 14.447581 abc
## 5 TLQ 12.857385 bcd
## 6 LAH 12.706290 cd
## 7 XH 12.658387 cd
## 8 PSJC 12.637500 cd
## 9 JC 11.324769 de
## 10 SAC 10.715902 de
## 11 GNL 10.637937 de
## 12 PLCC 10.149677 e
## 13 LLC 9.737333 e
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,20),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,30),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,20),density=20,col="black",main="Grupos",ylab="Diámetro Normal (cm)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
boxplot(POH$DAP14 ~ POH$Localidad, xlab = "Localidades", ylab = "Diamétro Normal (cm)")
ANOVA DEL DIAMETRO DE COPA
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)
SNAMZ<- OMZ1[which(!is.na(OMZ1$DC14)),] #Eliminar NA
tapply(SNAMZ$DC14,list(SNAMZ$procedencia,SNAMZ$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 4.541667 NA 6.450000 3.975000 3.375000 4.633333 2.800000
## EMQ 4.875000 NA 3.941667 1.983333 4.650000 2.691667 3.866667
## EPH 4.860000 2.600000 4.150000 5.600000 5.700000 1.675000 3.266667
## GNL 4.016667 NA 2.812500 1.200000 1.583333 3.958333 3.100000
## JC 4.900000 4.540000 2.000000 4.100000 2.558333 2.600000 2.725000
## LAH NA 2.550000 2.666667 4.383333 2.600000 2.800000 3.800000
## LLC 4.808333 NA 4.425000 2.583333 1.650000 2.700000 2.175000
## MH 5.016667 5.250000 4.266667 4.600000 2.458333 4.791667 NA
## PLCC 3.225000 3.290000 3.900000 1.900000 3.350000 1.958333 2.050000
## PSJC 2.358333 2.000000 2.516667 5.300000 2.866667 4.537500 2.350000
## SAC 3.375000 3.166667 NA NA 3.525000 5.200000 3.075000
## TLQ 4.150000 3.576667 3.150000 2.093333 1.737500 3.433333 3.208333
## XH 4.000000 2.562500 3.966667 NA 3.600000 2.991667 2.375000
## 8 9 10 11 12
## CDZH 3.058333 4.375000 3.875000 2.666667 4.550000
## EMQ 4.716667 3.941667 3.925000 3.200000 3.916667
## EPH 2.925000 5.708333 4.383333 3.318333 5.250000
## GNL 4.000000 4.725000 2.175000 2.650000 4.525000
## JC 4.008333 3.800000 3.450000 4.816667 4.316667
## LAH 3.675000 1.812500 4.333333 3.725000 2.850000
## LLC 3.312500 2.987500 4.416667 2.791667 3.275000
## MH 4.100000 4.637500 5.525000 1.841667 3.775000
## PLCC 2.750000 3.850000 2.766667 3.675000 2.783333
## PSJC 3.100000 3.541667 5.575000 3.237500 4.716667
## SAC 3.525000 2.991667 3.616667 1.866667 3.616667
## TLQ 3.075000 2.350000 4.866667 1.765000 4.000000
## XH 2.283333 3.983333 3.016667 3.500000 2.940000
library(graphics)
with(SNAMZ, {
interaction.plot(procedencia, bloque, DC14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DC14, procedencia, mean)))
interaction.plot(bloque, procedencia,DC14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Magdalena Zahuatlán")
})
library(agricolae)
SNAMZ$bloque= factor(SNAMZ$bloque)
modelo <- aov(DC14~bloque*procedencia,data=SNAMZ)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 56.04 5.095 6.030 1.23e-08 ***
## procedencia 12 52.69 4.391 5.197 1.06e-07 ***
## bloque:procedencia 123 281.94 2.292 2.713 3.82e-11 ***
## Residuals 228 192.65 0.845
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 3.482773 26.39317 0.8449551 0.811757 28.75248
##
## $parameters
## Df ntr StudentizedRange
## 228 13 4.735293
##
## $means
## DC14 std r Min Max
## CDZH 3.842857 1.2116689 28 1.450 6.450
## EMQ 3.736290 1.0036566 31 1.550 5.650
## EPH 4.147188 1.7523031 32 1.000 7.875
## GNL 3.120000 1.3320389 30 0.850 5.550
## JC 3.513065 1.0622223 31 1.550 5.350
## LAH 3.307407 1.0288346 27 1.250 4.900
## LLC 3.223077 1.1400641 26 1.400 5.275
## MH 4.126786 1.3998004 28 1.100 6.050
## PLCC 2.949286 0.9406880 28 1.225 4.925
## PSJC 3.428571 1.4759760 28 1.900 8.150
## SAC 3.326786 1.0659053 28 1.350 6.200
## TLQ 3.201379 1.2254867 29 1.175 5.400
## XH 3.247586 0.7086703 29 1.825 4.350
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 4.147188 a
## 2 MH 4.126786 ab
## 3 CDZH 3.842857 abc
## 4 EMQ 3.736290 abcd
## 5 JC 3.513065 abcd
## 6 PSJC 3.428571 abcd
## 7 SAC 3.326786 bcd
## 8 LAH 3.307407 bcd
## 9 XH 3.247586 cd
## 10 LLC 3.223077 cd
## 11 TLQ 3.201379 cd
## 12 GNL 3.120000 cd
## 13 PLCC 2.949286 d
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,6),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,5),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,10),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,5),density=20,col="black",main="Grupos",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
plot(modelo)
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361
#ANALISIS DE TP
OTP1<-read.csv("C:/LUGO/GRETP.csv", header=T)
SNATP<- OTP1[which(!is.na(OTP1$DC14)),] #Eliminar NA
tapply(SNATP$DC14,list(SNATP$procedencia,SNATP$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 3.456667 3.666667 5.940000 3.870000 4.776667 5.133333 6.093333
## EMQ 5.890000 4.416667 5.310000 3.560000 4.783333 5.366667 5.016667
## EPH 4.033333 4.916667 5.363333 4.500000 4.523333 5.100000 4.576667
## GNL 3.516667 3.046667 3.576667 3.090000 3.733333 3.590000 3.265000
## JC 3.703333 4.006667 3.370000 3.443333 3.853333 4.026667 3.783333
## LAH 4.546667 4.000000 4.556667 4.176667 4.060000 4.746667 4.250000
## LLC 4.886667 3.880000 2.703333 2.736667 3.690000 3.353333 4.500000
## MH 4.416667 4.226667 5.030000 4.866667 4.935000 4.470000 3.920000
## PLCC 3.246667 3.280000 3.980000 3.456667 3.536667 3.720000 4.126667
## PSJC 3.016667 3.510000 3.326667 5.316667 4.803333 4.790000 3.530000
## SAC 3.336667 3.516667 3.473333 4.216667 3.603333 3.940000 3.100000
## TLQ 3.296667 5.330000 4.683333 4.503333 4.653333 5.086667 5.146667
## XH 4.775000 4.160000 4.543333 4.093333 4.093333 3.796667 4.850000
## 8 9 10 11 12
## CDZH 5.526667 5.120000 4.886667 4.233333 4.775000
## EMQ 5.540000 4.043333 5.420000 4.583333 6.050000
## EPH 6.350000 5.263333 6.416667 4.243333 4.220000
## GNL 4.475000 3.510000 4.256667 3.956667 3.433333
## JC 3.003333 3.815000 4.570000 2.980000 3.223333
## LAH 4.200000 4.026667 4.483333 4.323333 4.513333
## LLC 3.373333 3.326667 4.125000 3.450000 3.413333
## MH 5.625000 4.733333 3.930000 4.396667 5.093333
## PLCC 4.140000 3.653333 3.383333 3.430000 2.966667
## PSJC 4.330000 4.020000 5.143333 3.963333 3.123333
## SAC 5.460000 3.393333 4.316667 3.930000 3.600000
## TLQ 3.713333 5.053333 4.133333 4.410000 5.593333
## XH 5.430000 5.430000 4.726667 5.030000 4.266667
library(graphics)
with(SNATP, {
interaction.plot(procedencia, bloque, DC14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DC14, procedencia, mean)))
interaction.plot(bloque, procedencia,DC14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Tlacotepec Plumas")
})
library(agricolae)
SNATP$bloque= factor(SNATP$bloque)
modelo <- aov(DC14~bloque*procedencia, data=SNATP)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 19.28 1.753 1.657 0.0827 .
## procedencia 12 119.09 9.924 9.381 2.5e-15 ***
## bloque:procedencia 132 129.54 0.981 0.928 0.6857
## Residuals 289 305.71 1.058
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 4.22618 24.33632 1.057805 0.8308746 34.2035
##
## $parameters
## Df ntr StudentizedRange
## 289 13 4.724631
##
## $means
## DC14 std r Min Max
## CDZH 4.790286 1.1923074 35 2.40 7.10
## EMQ 4.941176 0.9034472 34 2.56 6.71
## EPH 4.877059 1.1407162 34 2.24 7.25
## GNL 3.609091 0.8165758 33 2.20 5.51
## JC 3.616176 0.6507293 34 2.18 4.94
## LAH 4.325714 0.9231350 35 2.79 6.10
## LLC 3.579118 0.9260518 34 1.19 5.51
## MH 4.599118 0.8961749 34 2.65 6.71
## PLCC 3.555882 0.6747350 34 2.40 5.00
## PSJC 4.072778 1.3735161 36 1.89 7.30
## SAC 3.721212 0.7776718 33 2.20 5.46
## TLQ 4.633611 1.4799211 36 1.51 8.30
## XH 4.561515 1.0835910 33 2.25 7.70
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 4.941176 a
## 2 EPH 4.877059 ab
## 3 CDZH 4.790286 ab
## 4 TLQ 4.633611 ab
## 5 MH 4.599118 ab
## 6 XH 4.561515 abc
## 7 LAH 4.325714 abcd
## 8 PSJC 4.072778 bcd
## 9 SAC 3.721212 cd
## 10 JC 3.616176 d
## 11 GNL 3.609091 d
## 12 LLC 3.579118 d
## 13 PLCC 3.555882 d
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,7),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,6),bar=FALSE,col="green",space=0.5,main="Error",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,9),bar=FALSE,col="blue", space=0.5,main="Rangos de valores = Max - Min",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,6),density=20,col="black",main="Grupos",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
plot(modelo)
## Warning: not plotting observations with leverage one:
## 285, 288
## Warning: not plotting observations with leverage one:
## 285, 288
PO<-read.csv("C:/LUGO/gregtod.csv", header=T)
POH<- PO[which(!is.na(PO$DC14)),] #Eliminar NA
tapply(POH$DC14,list(POH$procedencia,POH$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 3.999167 3.666667 6.067500 3.912000 4.075833 4.883333 4.446667
## EMQ 5.281000 4.416667 4.625833 2.771667 4.750000 4.029167 4.441667
## EPH 4.446667 3.758333 4.878000 4.940000 5.111667 3.387500 3.921667
## GNL 3.766667 3.046667 3.271000 2.145000 2.658333 3.774167 3.182500
## JC 4.002500 4.220000 2.685000 3.607500 3.205833 3.313333 3.254167
## LAH 4.546667 3.275000 3.611667 4.280000 3.695000 4.260000 3.980000
## LLC 4.847500 3.880000 3.392000 2.660000 2.670000 3.190000 3.337500
## MH 4.716667 4.738333 4.648333 4.733333 3.449000 4.630833 3.920000
## PLCC 3.238000 3.284000 3.960000 2.678333 3.443333 2.663000 3.607500
## PSJC 2.687500 3.132500 2.921667 5.312500 3.835000 4.689000 3.058000
## SAC 3.355833 3.341667 3.473333 4.216667 3.572000 4.570000 3.087500
## TLQ 3.638000 4.453333 4.300000 3.298333 3.487000 4.260000 4.177500
## XH 4.310000 3.521000 4.255000 4.093333 3.896000 3.394167 3.612500
## 8 9 10 11 12
## CDZH 4.292500 4.747500 4.482000 3.450000 4.662500
## EMQ 5.128333 3.992500 4.672500 3.891667 4.770000
## EPH 4.637500 5.485833 5.400000 3.780833 4.735000
## GNL 4.190000 4.117500 3.215833 3.303333 3.979167
## JC 3.505833 3.806000 3.898000 3.898333 3.770000
## LAH 3.990000 3.141000 4.408333 4.024167 3.681667
## LLC 3.349000 3.191000 4.300000 3.120833 3.358000
## MH 4.710000 4.695000 4.328750 3.119167 4.763750
## PLCC 3.676667 3.751667 3.075000 3.552500 2.875000
## PSJC 3.715000 3.780833 5.316000 3.673000 3.920000
## SAC 4.008750 3.192500 3.966667 2.898333 3.608333
## TLQ 3.458000 3.972000 4.500000 3.352000 4.796667
## XH 3.542000 4.706667 3.871667 4.265000 3.736000
library(graphics)
with(POH, {
interaction.plot(procedencia, Localidad, DC14, col=1:2,cex.axis=.8,cex.lab=1.5,cex.main=1.5,lty = 1,lwd=2,main="a) Interaction of the localities evaluated")
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(DC14, procedencia, mean)))
interaction.plot(Localidad, procedencia,DC14, col = 1:8,cex.axis=1,cex.lab=1.5,cex.main=1.5,lwd=2,lty = 1,main="b) Interaction of the provenances in the two localities")
})
library(agricolae)
POH$bloque= factor(POH$bloque)
modelo <- aov(DC14~Localidad+procedencia+bloque+Localidad:procedencia+Localidad:bloque+procedencia:bloque+Localidad:procedencia:bloque,data=POH)
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## Localidad 1 112.5 112.47 116.676 < 2e-16 ***
## procedencia 12 141.0 11.75 12.194 < 2e-16 ***
## bloque 11 39.1 3.55 3.685 4.60e-05 ***
## Localidad:procedencia 12 31.3 2.61 2.705 0.001497 **
## Localidad:bloque 11 35.7 3.25 3.366 0.000165 ***
## procedencia:bloque 132 224.9 1.70 1.767 6.04e-06 ***
## Localidad:procedencia:bloque 123 186.6 1.52 1.574 0.000378 ***
## Residuals 517 498.4 0.96
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 3.886207 25.26378 0.9639371 0.5821099 63.0295
##
## $parameters
## Df ntr StudentizedRange
## 517 13 4.70709
##
## $means
## DC14 std r Min Max
## CDZH 4.369206 1.2822429 63 1.450 7.100
## EMQ 4.366538 1.1228844 65 1.550 6.710
## EPH 4.523182 1.5033805 66 1.000 7.875
## GNL 3.376190 1.1111748 63 0.850 5.550
## JC 3.567000 0.8659865 65 1.550 5.350
## LAH 3.882258 1.0886914 62 1.250 6.100
## LLC 3.424833 1.0305601 60 1.190 5.510
## MH 4.385806 1.1653031 62 1.100 6.710
## PLCC 3.281935 0.8547449 62 1.225 5.000
## PSJC 3.790938 1.4441180 64 1.890 8.150
## SAC 3.540164 0.9343933 61 1.350 6.200
## TLQ 3.994615 1.5393463 65 1.175 8.300
## XH 3.946935 1.1328433 62 1.825 7.700
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 4.523182 a
## 2 MH 4.385806 ab
## 3 CDZH 4.369206 abc
## 4 EMQ 4.366538 abc
## 5 TLQ 3.994615 abcd
## 6 XH 3.946935 abcde
## 7 LAH 3.882258 bcde
## 8 PSJC 3.790938 cdef
## 9 JC 3.567000 def
## 10 SAC 3.540164 def
## 11 LLC 3.424833 def
## 12 GNL 3.376190 ef
## 13 PLCC 3.281935 f
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,6),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,5),bar=FALSE,col="green",space=1,main="Error",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,9),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,5),density=20,col="black",main="Grupos",ylab="Diámetro de Copa (m)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
boxplot(POH$DC14 ~ POH$Localidad, xlab = "Localidad", ylab = "Diamétro de Copa (m)")
plot(modelo)
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361, 660, 663
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361, 660, 663
ANOVA DEL AREA DE COPA
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)
SNAMZ<- OMZ1[which(!is.na(OMZ1$AC14)),] #Eliminar NA
tapply(SNAMZ$AC14,list(SNAMZ$procedencia,SNAMZ$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 16.253333 NA 32.670000 12.625000 9.056667 17.650000 6.383333
## EMQ 18.710000 NA 12.536667 3.176667 16.980000 5.933333 11.756667
## EPH 19.776667 6.346667 13.580000 25.015000 28.853333 2.323333 9.140000
## GNL 13.316667 NA 6.900000 1.300000 2.053333 13.466667 7.555000
## JC 18.860000 16.705000 3.236667 13.200000 5.146667 5.460000 5.840000
## LAH NA 5.416667 6.196667 15.206667 5.310000 6.160000 11.993333
## LLC 18.386667 NA 15.595000 5.613333 2.216667 5.730000 3.840000
## MH 19.840000 21.876667 16.056667 16.886667 4.960000 18.660000 NA
## PLCC 8.310000 8.530000 11.950000 3.153333 9.380000 3.130000 3.300000
## PSJC 4.586667 3.140000 4.996667 22.060000 6.496667 16.170000 4.340000
## SAC 9.340000 9.170000 NA NA 9.820000 22.020000 7.933333
## TLQ 13.535000 10.193333 7.790000 3.606667 2.615000 9.353333 10.000000
## XH 12.593333 5.175000 12.380000 NA 10.210000 7.110000 4.490000
## 8 9 10 11 12
## CDZH 8.450000 16.546667 11.875000 6.173333 16.33000
## EMQ 17.826667 12.316667 12.346667 8.283333 12.65667
## EPH 6.720000 27.933333 15.646667 9.226667 21.79333
## GNL 12.636667 17.645000 3.813333 5.690000 16.25333
## JC 12.893333 11.883333 9.536667 18.310000 14.89667
## LAH 10.965000 2.830000 15.210000 11.040000 6.45000
## LLC 8.625000 7.010000 15.556667 6.493333 8.48500
## MH 13.933333 17.290000 23.970000 3.226667 11.19000
## PLCC 5.940000 11.746667 6.356667 11.693333 6.27000
## PSJC 8.930000 11.300000 29.620000 8.365000 17.86000
## SAC 10.403333 7.306667 10.420000 2.923333 10.43667
## TLQ 7.645000 4.750000 18.880000 2.535000 13.46667
## XH 4.193333 12.630000 7.246667 9.813333 6.81000
library(graphics)
with(SNAMZ, {
interaction.plot(procedencia, bloque, AC14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(AC14, procedencia, mean)))
interaction.plot(bloque, procedencia,AC14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Magdalena Zahuatlán")
})
library(agricolae)
SNAMZ$bloque= factor(SNAMZ$bloque)
modelo <- aov(AC14~bloque*procedencia,data=SNAMZ)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 1616 146.88 4.235 1.00e-05 ***
## procedencia 12 2249 187.43 5.404 4.62e-08 ***
## bloque:procedencia 123 9559 77.72 2.241 7.62e-08 ***
## Residuals 228 7908 34.69
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia",alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 10.74837 54.79369 34.68538 5.200948 28.75248
##
## $parameters
## Df ntr StudentizedRange
## 228 13 4.735293
##
## $means
## AC14 std r Min Max
## CDZH 12.709643 7.491431 28 1.65 32.67
## EMQ 11.729355 5.670569 31 1.89 25.07
## EPH 15.844688 12.374350 32 0.79 48.71
## GNL 8.993000 6.768025 30 0.57 24.19
## JC 10.550968 5.979884 31 1.89 22.48
## LAH 9.392593 5.384387 27 1.23 18.86
## LLC 9.140000 6.099204 26 1.54 21.85
## MH 14.859286 8.208843 28 0.95 28.75
## PLCC 7.502143 4.550713 28 1.18 19.05
## PSJC 10.882143 10.492061 28 2.84 52.17
## SAC 9.552857 5.872496 28 1.43 30.19
## TLQ 9.187931 6.531005 29 1.08 22.90
## XH 8.664483 3.584177 29 2.62 14.86
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 15.844688 a
## 2 MH 14.859286 ab
## 3 CDZH 12.709643 abc
## 4 EMQ 11.729355 abc
## 5 PSJC 10.882143 abc
## 6 JC 10.550968 bc
## 7 SAC 9.552857 c
## 8 LAH 9.392593 c
## 9 TLQ 9.187931 c
## 10 LLC 9.140000 c
## 11 GNL 8.993000 c
## 12 XH 8.664483 c
## 13 PLCC 7.502143 c
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,20),bar=FALSE,col="green",space=1,main="Error",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,55),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Ãrea de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,20),density=20,col="black",main="Grupos",ylab="Ãrea de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
plot(modelo)
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361
#ANALISIS DE TP
OTP1<-read.csv("C:/LUGO/GRETP.csv", header=T)
SNATP<- OTP1[which(!is.na(OTP1$AC14)),] #Eliminar NA
tapply(SNATP$DC14,list(SNATP$procedencia,SNATP$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 3.456667 3.666667 5.940000 3.870000 4.776667 5.133333 6.093333
## EMQ 5.890000 4.416667 5.310000 3.560000 4.783333 5.366667 5.016667
## EPH 4.033333 4.916667 5.363333 4.500000 4.523333 5.100000 4.576667
## GNL 3.516667 3.046667 3.576667 3.090000 3.733333 3.590000 3.265000
## JC 3.703333 4.006667 3.370000 3.443333 3.853333 4.026667 3.783333
## LAH 4.546667 4.000000 4.556667 4.176667 4.060000 4.746667 4.250000
## LLC 4.886667 3.880000 2.703333 2.736667 3.690000 3.353333 4.500000
## MH 4.416667 4.226667 5.030000 4.866667 4.935000 4.470000 3.920000
## PLCC 3.246667 3.280000 3.980000 3.456667 3.536667 3.720000 4.126667
## PSJC 3.016667 3.510000 3.326667 5.316667 4.803333 4.790000 3.530000
## SAC 3.336667 3.516667 3.473333 4.216667 3.603333 3.940000 3.100000
## TLQ 3.296667 5.330000 4.683333 4.503333 4.653333 5.086667 5.146667
## XH 4.775000 4.160000 4.543333 4.093333 4.093333 3.796667 4.850000
## 8 9 10 11 12
## CDZH 5.526667 5.120000 4.886667 4.233333 4.775000
## EMQ 5.540000 4.043333 5.420000 4.583333 6.050000
## EPH 6.350000 5.263333 6.416667 4.243333 4.220000
## GNL 4.475000 3.510000 4.256667 3.956667 3.433333
## JC 3.003333 3.815000 4.570000 2.980000 3.223333
## LAH 4.200000 4.026667 4.483333 4.323333 4.513333
## LLC 3.373333 3.326667 4.125000 3.450000 3.413333
## MH 5.625000 4.733333 3.930000 4.396667 5.093333
## PLCC 4.140000 3.653333 3.383333 3.430000 2.966667
## PSJC 4.330000 4.020000 5.143333 3.963333 3.123333
## SAC 5.460000 3.393333 4.316667 3.930000 3.600000
## TLQ 3.713333 5.053333 4.133333 4.410000 5.593333
## XH 5.430000 5.430000 4.726667 5.030000 4.266667
library(graphics)
with(SNATP, {
interaction.plot(procedencia, bloque, AC14, ylim=c(0,17))
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(AC14, procedencia, mean)))
interaction.plot(bloque, procedencia,AC14,col=1:8, cex.axis=1.5,cex.lab=1.5,cex.main=1.5,lwd=2,lty=1,main="a) Interaction in Tlacotepec Plumas")
})
library(agricolae)
SNATP$bloque= factor(SNATP$bloque)
modelo <- aov(AC14~bloque*procedencia,data=SNATP)#Modelo Bloque Completos al Azar
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## bloque 11 1070 97.2 1.858 0.0446 *
## procedencia 12 5863 488.5 9.336 2.99e-15 ***
## bloque:procedencia 132 6606 50.0 0.956 0.6106
## Residuals 289 15123 52.3
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)# Modelo de Tukey para las procedencias
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 15.03987 48.0979 52.32873 5.843899 34.2035
##
## $parameters
## Df ntr StudentizedRange
## 289 13 4.724631
##
## $means
## AC14 std r Min Max
## CDZH 19.10657 9.243338 35 4.52 39.59
## EMQ 19.79765 6.751448 34 5.15 35.36
## EPH 19.67294 8.746685 34 3.94 41.28
## GNL 10.73758 4.787483 33 3.80 23.84
## JC 10.59265 3.729349 34 3.73 19.17
## LAH 15.34657 6.372436 35 6.11 29.22
## LLC 10.71353 5.242028 34 1.11 23.84
## MH 17.22529 6.544515 34 5.52 35.36
## PLCC 10.27735 3.841738 34 4.52 19.64
## PSJC 14.46833 9.570207 36 2.81 41.85
## SAC 11.33606 4.608616 33 3.80 23.41
## TLQ 18.53528 11.181880 36 1.79 54.11
## XH 17.23697 8.075567 33 3.98 46.57
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EMQ 19.79765 a
## 2 EPH 19.67294 a
## 3 CDZH 19.10657 a
## 4 TLQ 18.53528 a
## 5 XH 17.23697 ab
## 6 MH 17.22529 ab
## 7 LAH 15.34657 abc
## 8 PSJC 14.46833 abc
## 9 SAC 11.33606 bc
## 10 GNL 10.73758 c
## 11 LLC 10.71353 c
## 12 JC 10.59265 c
## 13 PLCC 10.27735 c
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Área de copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,25),bar=FALSE,col="green",space=0.5,main="Error",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,55),bar=FALSE,col="blue", space=0.5,main="Rangos de valores = Max - Min",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,25),density=20,col="black",main="Grupos",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
plot(modelo)
## Warning: not plotting observations with leverage one:
## 285, 288
## Warning: not plotting observations with leverage one:
## 285, 288
PO<-read.csv("C:/LUGO/gregtod.csv", header=T)
POH<- PO[which(!is.na(PO$AC14)),] #Eliminar NA
tapply(POH$AC14,list(POH$procedencia,POH$bloque),mean)#PROMEDIO POR BLOQUES
## 1 2 3 4 5 6 7
## CDZH 12.948333 11.220000 29.185000 12.302000 13.936667 19.29667 17.936667
## EMQ 22.336000 15.700000 17.356667 7.013333 17.875000 14.31333 15.778333
## EPH 16.460000 13.446667 19.196000 20.088000 22.630000 11.59333 12.796667
## GNL 11.695000 7.546667 8.874000 4.441667 6.580000 11.97167 8.037500
## JC 12.830000 14.460000 6.270000 10.357500 8.601667 9.15000 8.560000
## LAH 16.246667 9.266667 11.643333 15.140000 12.082500 15.00250 12.872000
## LLC 18.806667 13.066667 10.222000 5.820000 6.480000 8.11000 9.897500
## MH 17.853333 18.648333 18.005000 17.876667 10.642000 17.63500 12.203333
## PLCC 8.410000 8.646000 12.512500 6.360000 9.863333 6.33400 11.107500
## PSJC 5.970000 8.580000 7.041667 22.425000 12.341667 17.40400 8.276000
## SAC 9.263333 9.840000 9.610000 14.050000 10.048000 17.36250 7.821667
## TLQ 10.630000 16.461667 15.057500 9.885000 12.598000 17.88167 16.250000
## XH 14.764000 10.322000 14.785000 13.286667 12.790000 9.69500 11.487500
## 8 9 10 11 12
## CDZH 16.81167 19.131667 16.452000 10.263333 17.120000
## EMQ 21.23500 12.586667 17.755000 12.448333 19.106000
## EPH 19.19500 25.163333 24.135000 11.708333 18.916667
## GNL 14.20800 14.190000 9.410000 9.026667 13.070000
## JC 10.14167 11.708000 12.298000 12.646667 11.655000
## LAH 12.98600 8.954000 16.188333 13.120000 11.240000
## LLC 8.92600 8.464000 14.688000 7.935000 8.984000
## MH 18.67000 17.606000 15.350000 9.225000 18.415000
## PLCC 10.98667 11.288333 7.838333 10.508333 6.658333
## PSJC 11.87167 14.118333 25.656000 11.432000 13.273333
## SAC 13.65500 8.368333 12.623333 7.768333 10.361667
## TLQ 11.08400 14.030000 16.526667 10.444000 19.588333
## XH 11.78000 19.658333 12.406667 14.860000 11.514000
library(graphics)
with(POH, {
interaction.plot(procedencia, Localidad, AC14, col=1:2,cex.axis=.8,cex.lab=1.5,cex.main=1.5,lty = 1,lwd=2,main="a) Interaction of the localities evaluated")
## order the rows by their mean effect
rowpos <- factor(procedencia,
levels = sort.list(tapply(AC14, procedencia, mean)))
interaction.plot(Localidad, procedencia,AC14, col = 1:8,cex.axis=1,cex.lab=1.5,cex.main=1.5,lwd=2,lty = 1,main="b) Interaction of the provenances in the two localities")
})
library(agricolae)
POH$bloque= factor(POH$bloque)
modelo <- aov(AC14~Localidad+procedencia+bloque+Localidad:procedencia+Localidad:bloque+procedencia:bloque+Localidad:procedencia:bloque, data=POH)
summary(modelo)
## Df Sum Sq Mean Sq F value Pr(>F)
## Localidad 1 3748 3748 84.133 < 2e-16 ***
## procedencia 12 6445 537 12.056 < 2e-16 ***
## bloque 11 1494 136 3.049 0.000572 ***
## Localidad:procedencia 12 1737 145 3.250 0.000156 ***
## Localidad:bloque 11 1121 102 2.287 0.009815 **
## procedencia:bloque 132 9206 70 1.566 0.000320 ***
## Localidad:procedencia:bloque 123 6959 57 1.270 0.039781 *
## Residuals 517 23031 45
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
tukey<-HSD.test(modelo,"procedencia", alpha=0.05)
head(tukey)
## $statistics
## Mean CV MSerror HSD r.harmonic
## 13.07729 51.03826 44.54791 3.957257 63.0295
##
## $parameters
## Df ntr StudentizedRange
## 517 13 4.70709
##
## $means
## AC14 std r Min Max
## CDZH 16.263492 9.031095 63 1.65 39.59
## EMQ 15.949692 7.420881 65 1.89 35.36
## EPH 17.816818 10.751103 66 0.79 48.71
## GNL 9.906825 5.833227 63 0.57 24.19
## JC 10.572769 4.892220 65 1.89 22.48
## LAH 12.753710 6.621843 62 1.23 29.22
## LLC 10.031667 5.634773 60 1.11 23.84
## MH 16.156774 7.376043 62 0.95 35.36
## PLCC 9.024032 4.369131 62 1.18 19.64
## PSJC 12.899375 10.063621 64 2.81 52.17
## SAC 10.517541 5.258252 61 1.43 30.19
## TLQ 14.364923 10.438706 65 1.08 54.11
## XH 13.227258 7.661791 62 2.62 46.57
##
## $comparison
## NULL
##
## $groups
## trt means M
## 1 EPH 17.816818 a
## 2 CDZH 16.263492 ab
## 3 MH 16.156774 ab
## 4 EMQ 15.949692 ab
## 5 TLQ 14.364923 abc
## 6 XH 13.227258 bcd
## 7 PSJC 12.899375 bcde
## 8 LAH 12.753710 bcde
## 9 JC 10.572769 cde
## 10 SAC 10.517541 cde
## 11 LLC 10.031667 de
## 12 GNL 9.906825 de
## 13 PLCC 9.024032 e
par(mfrow=c(2,2),cex=0.6)
bar.err(tukey$means,variation="SD",horiz=FALSE,ylim=c(0,30),bar=FALSE,col="gray",space=0.5, main="Desviación Estandar",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="SE",horiz=FALSE,ylim=c(0,20),bar=FALSE,col="green",space=1,main="Error",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.err(tukey$means,variation="range",ylim=c(0,55),bar=FALSE,col="blue", space=1,main="Rangos de valores = Max - Min",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
bar.group(tukey$groups,horiz=FALSE,ylim=c(0,20),density=20,col="black",main="Grupos",ylab="Área de Copa (m2)",las=2,cex.axis=2,cex.lab=1.5,cex.main=2,cex=1.5,font.main=2,font.axis=2)
boxplot(POH$AC14 ~ POH$Localidad, xlab = "Localidad", ylab = "Ãrea de Copa (m2)")
plot(modelo)
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361, 660, 663
## Warning: not plotting observations with leverage one:
## 23, 36, 67, 68, 78, 87, 88, 126, 131, 141, 142, 181, 226, 235, 298, 361, 660, 663
CORRELACI?N
library(agricolae)
OMZ1<-read.csv("C:/TESIS/ANOVA/CORR-GRE.csv", header=T)
correlation(OMZ1[c(2,3,4,5,6,7,20,21,22,23,24)],method="pearson")
##
## Correlation Analysis
##
## Method : pearson
## Alternative: two.sided
## $correlation
## LAT.N LON.O ALT TEMP PPTN PH H.A DN.A DB.A DC.A AC.A
## LAT.N 1 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## LON.O 1 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## ALT 0 0 1.00 -0.70 -0.83 0.80 -0.60 -0.61 -0.59 -0.63 -0.60
## TEMP 0 0 -0.70 1.00 0.61 -0.68 0.48 0.42 0.40 0.39 0.38
## PPTN 0 0 -0.83 0.61 1.00 -0.78 0.38 0.38 0.33 0.41 0.38
## PH 0 0 0.80 -0.68 -0.78 1.00 -0.65 -0.57 -0.55 -0.56 -0.55
## H.A 0 0 -0.60 0.48 0.38 -0.65 1.00 0.95 0.94 0.95 0.94
## DN.A 0 0 -0.61 0.42 0.38 -0.57 0.95 1.00 0.98 0.97 0.98
## DB.A 0 0 -0.59 0.40 0.33 -0.55 0.94 0.98 1.00 0.98 0.97
## DC.A 0 0 -0.63 0.39 0.41 -0.56 0.95 0.97 0.98 1.00 0.99
## AC.A 0 0 -0.60 0.38 0.38 -0.55 0.94 0.98 0.97 0.99 1.00
##
## $pvalue
## LAT.N LON.O ALT TEMP PPTN PH
## LAT.N 1.0000000 0.0000000 0.9999998682 1.00000000 0.9999999638 1.000000000
## LON.O 0.0000000 1.0000000 0.9999998682 1.00000000 0.9999999638 1.000000000
## ALT 0.9999999 0.9999999 1.0000000000 0.01085806 0.0008828833 0.001736561
## TEMP 1.0000000 1.0000000 0.0108580580 1.00000000 0.0335333292 0.014018926
## PPTN 1.0000000 1.0000000 0.0008828833 0.03353333 1.0000000000 0.002772568
## PH 1.0000000 1.0000000 0.0017365608 0.01401893 0.0027725679 1.000000000
## H.A 1.0000000 1.0000000 0.0373651687 0.11665576 0.2260560022 0.022667033
## DN.A 0.9999998 0.9999998 0.0336057914 0.17533431 0.2232090251 0.052322586
## DB.A 1.0000000 1.0000000 0.0443794373 0.20163832 0.2882728843 0.062449255
## DC.A 0.9999997 0.9999997 0.0268978663 0.20599364 0.1890453850 0.057855141
## AC.A 0.9999999 0.9999999 0.0375166059 0.22099953 0.2229095298 0.065327693
## H.A DN.A DB.A DC.A AC.A
## LAT.N 1.000000e+00 9.999998e-01 1.000000e+00 9.999997e-01 9.999999e-01
## LON.O 1.000000e+00 9.999998e-01 1.000000e+00 9.999997e-01 9.999999e-01
## ALT 3.736517e-02 3.360579e-02 4.437944e-02 2.689787e-02 3.751661e-02
## TEMP 1.166558e-01 1.753343e-01 2.016383e-01 2.059936e-01 2.209995e-01
## PPTN 2.260560e-01 2.232090e-01 2.882729e-01 1.890454e-01 2.229095e-01
## PH 2.266703e-02 5.232259e-02 6.244925e-02 5.785514e-02 6.532769e-02
## H.A 1.000000e+00 6.660529e-07 1.860493e-06 7.859853e-07 1.275145e-06
## DN.A 6.660529e-07 1.000000e+00 2.903317e-09 5.605179e-08 2.648523e-09
## DB.A 1.860493e-06 2.903317e-09 1.000000e+00 7.761038e-09 1.788938e-08
## DC.A 7.859853e-07 5.605179e-08 7.761038e-09 1.000000e+00 5.443319e-10
## AC.A 1.275145e-06 2.648523e-09 1.788938e-08 5.443319e-10 1.000000e+00
##
## $n.obs
## LAT.N LON.O ALT TEMP PPTN PH H.A DN.A DB.A DC.A AC.A
## LAT.N 12 12 12 12 12 12 12 12 12 12 12
## LON.O 12 12 12 12 12 12 12 12 12 12 12
## ALT 12 12 12 12 12 12 12 12 12 12 12
## TEMP 12 12 12 12 12 12 12 12 12 12 12
## PPTN 12 12 12 12 12 12 12 12 12 12 12
## PH 12 12 12 12 12 12 12 12 12 12 12
## H.A 12 12 12 12 12 12 13 13 13 13 13
## DN.A 12 12 12 12 12 12 13 13 13 13 13
## DB.A 12 12 12 12 12 12 13 13 13 13 13
## DC.A 12 12 12 12 12 12 13 13 13 13 13
## AC.A 12 12 12 12 12 12 13 13 13 13 13
library(psych)
## Warning: package 'psych' was built under R version 3.1.3
pairs.panels(OMZ1[c(2,3,4,5,6,7,8,9,10,11,12)],cex=6,font=2,pch=19,font.labels =2)#CORRELACIÓN DE VARIABLES EN MZ
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
pairs.panels(OMZ1[c(2,3,4,5,6,7,14,15,16,17,18)],cex=6,font=2,pch=19,font.labels = 2)#CORRELACIÓN DE VARIABLES EN TP
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
pairs.panels(OMZ1[c(2,3,4,5,6,7,20,21,22,23,24)],cex=6,font=2,pch=19,font.labels = 2)#CORRELACIÓN DE VARIABLES EN TP
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
## Warning in cor(x, y, use = "pairwise", method = method): the standard
## deviation is zero
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)# FACTORES
OTP2<-read.csv("C:/LUGO/GRETP.csv", header=T)# FACTORES
par(mfrow=c(1,2),cex=0.6)
boxplot(H14~procedencia, data=OMZ1)
boxplot(H14~procedencia, data=OTP2)
H14<-OMZ1[c(3,16)]#Seleccion de columnas de interes
plot.design(H14,fun ="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="Altura (m)", main="Magdalena Zahuatlán",cex.main=3,ylim=c(5,13))
H14<-OTP2[c(3,13)]#Seleccion de columnas de interes
plot.design(H14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab=" ",main="Tlacotepec Plumas",cex.main=3,ylim=c(5,13))
DB14<-OMZ1[c(3,17)]#Seleccion de columnas de interes
plot.design(DB14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="Diámetro Basal (cm)", main="Magdalena Zahuatlán",cex.main=3,ylim=c(11,23))
DB14<-OTP2[c(3,14)]#Seleccion de columnas de interes
plot.design(DB14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab=" ", main="Tlacotepec Plumas",cex.main=3,ylim=c(11,23))
DAP14<-OMZ1[c(3,18)]#Seleccion de columnas de interes
plot.design(DAP14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="Diámetro Normal (cm)", main="Magdalena Zahuatlán",cex.main=3,ylim=c(8,18))
DAP14<-OTP2[c(3,15)]#Seleccion de columnas de interes
plot.design(DAP14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="", main="Tlacotepec Plumas",cex.main=3,ylim=c(8,18))
DC14<-OMZ1[c(3,19)]#Seleccion de columnas de interes
plot.design(DC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="Diámetro de Copa (m)", main="Magdalena Zahuatlán",cex.main=3,ylim=c(2.5,5))
DC14<-OTP2[c(3,16)]#Seleccion de columnas de interes
plot.design(DC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab=" " , main="Tlacotepec Plumas",cex.main=3,ylim=c(2.5,5))
AC14<-OMZ1[c(3,20)]#Seleccion de columnas de interes
plot.design(AC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="Área de Copa (m2/arb)", main="Magdalena Zahuatlán",cex.main=3,ylim=c(7,20))
AC14<-OTP2[c(3,17)]#Seleccion de columnas de interes
plot.design(AC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab=" ", main="Tlacotepec Plumas",cex.main=3,ylim=c(7,20))
OTO1<-read.csv("C:/LUGO/gregtod.csv", header=T)# FACTORES
boxplot(H14~procedencia, data=OTO1)
par(mfrow=c(1,2),cex=0.6)
H<-OTO1[c(3,17)]#Seleccion de columnas de interes
plot.design(H, fun = "mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="m", main="Altura",cex.main=3,ylim=c(6.5,11.5))
DB14<-OTO1[c(3,18)]#Seleccion de columnas de interes
plot.design(DB14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab=" cm", main="Diámetro Basal",cex.main=3,ylim=c(12,21))
par(mfrow=c(1,3),cex=0.6)
DAP14<-OTO1[c(3,19)]#Seleccion de columnas de interes
plot.design(DAP14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="cm", main="Diámetro Normal",cex.main=3,ylim=c(9.5,16.5))
DC14<-OTO1[c(3,20)]#Seleccion de columnas de interes
plot.design(DC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="m", main="Diámetro de Copa",cex.main=3,ylim=c(3.2,4.7))
AC14<-OTO1[c(3,21)]#Seleccion de columnas de interes
plot.design(AC14,fun="mean",las=1,cex.axis=2.5,cex.lab=2.5,cex=2.5,font.main=2,ylab="m2/arb", main="Área de Copa",cex.main=3,ylim=c(8,19))
graficos de crecimiento por mediciones
OMZ1<-read.csv("C:/LUGO/GREMZ.csv", header=T)# FACTORES
par(mfrow=c(2,5),cex=0.6)
H<-OMZ1[c(3,4,6,8,11,16)]#Seleccion de columnas de interes
plot.design(H, fun = "mean")
DB<-OMZ1[c(3,5,7,9,12,17)]#Seleccion de columnas de interes
plot.design(DB, fun = "mean")
par(mfrow=c(2,3),cex=0.6)
DAP<-OMZ1[c(3,10,13,18)]#Seleccion de columnas de interes
plot.design(DAP, fun = "mean")
## Warning: some levels of the factors are empty
DC<-OMZ1[c(3,14,19)]#Seleccion de columnas de interes
plot.design(DC, fun = "mean")
AC<-OMZ1[c(3,15,20)]#Seleccion de columnas de interes
plot.design(AC, fun = "mean")
#Falta lo de Tlacotepec Plumas y DE AMBAS
OMZ1<-read.csv("C:/LUGO/gregtod.csv", header=TRUE)# FACTORES
H<- as.numeric(OMZ1$H97)
par(mfrow=c(2,5),cex=0.6)
str(OMZ1)
## 'data.frame': 936 obs. of 23 variables:
## $ Localidad : Factor w/ 2 levels "Magdalena Zahuatlan",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ bloque : int 1 1 1 1 1 1 1 1 1 1 ...
## $ procedencia: Factor w/ 13 levels "CDZH","EMQ","EPH",..: 4 4 4 8 8 8 7 7 7 12 ...
## $ planta : int 4 5 6 4 5 6 4 5 6 4 ...
## $ H97 : Factor w/ 97 levels "",".","0.06",..: 26 32 13 59 39 58 28 27 16 43 ...
## $ DB97 : num 2 1.9 1.35 2.2 3.2 3.15 2 1.9 1.95 NA ...
## $ H99 : num 0.71 0.95 0.59 1.07 1.13 1.45 0.95 0.96 0.69 NA ...
## $ DB99 : num 1.97 3.33 1.65 2.91 3.61 4 2.42 2.53 2.89 NA ...
## $ H04 : num 3.2 2.6 3.6 2.4 4.8 6.1 5.5 2.6 3.2 NA ...
## $ DB04 : num 10.5 7.64 9.55 6.68 14.01 ...
## $ DAP04 : num 4.3 4.46 5.41 3.18 4.3 ...
## $ H12 : num 5 6.86 6 9.48 11.4 11 7.4 6.8 7.5 NA ...
## $ DB12 : num 13.4 17.2 11.5 18.1 27.7 21 15.9 12.4 16.2 NA ...
## $ DAP12 : num 9.9 14.7 9.2 15.9 22 20.4 15.6 9.5 12.4 NA ...
## $ DC12 : num 2.8 5.5 2.95 4.2 4.5 4.85 3.85 4.1 4.55 NA ...
## $ AC12 : num 6.16 23.76 6.83 13.85 15.9 ...
## $ H14 : num 5.5 8.5 7 11 11.5 12 8 8.5 9 NA ...
## $ DB14 : num 14 19.4 13.1 22 28.6 ...
## $ DAP14 : num 11.1 16.2 10.2 16.9 22.6 ...
## $ DC14 : num 3.35 5.3 3.4 5.45 4.85 ...
## $ AC14 : num 8.81 22.06 9.08 23.33 18.47 ...
## $ X : Factor w/ 18 levels "","CDZH","EMQ",..: 1 17 12 14 13 8 6 5 16 3 ...
## $ X.1 : Factor w/ 15 levels "","COMUNUDAD DURANGO ZIMAPµN, HIDALGO",..: 10 1 11 13 12 8 6 5 1 3 ...
H<-OMZ1[c(3,5,7,9,12,17)]#Seleccion de columnas de interes
plot.design(H, fun = "mean")
## Warning: some levels of the factors are empty
## Warning: some levels of the factors are empty
## Warning: some levels of the factors are empty
## Warning: some levels of the factors are empty
DB<-OMZ1[c(3,6,8,10,13,18)]#Seleccion de columnas de interes
plot.design(DB, fun = "mean")
par(mfrow=c(1,3),cex=0.6)
DAP<-OMZ1[c(3,11,14,19)]#Seleccion de columnas de interes
plot.design(DAP, fun = "mean")
par(mfrow=c(2,2),cex=0.6)
DC<-OMZ1[c(3,15,20)]#Seleccion de columnas de interes
plot.design(DC, fun = "mean")
AC<-OMZ1[c(3,16,21)]#Seleccion de columnas de interes
plot.design(AC, fun = "mean")
SUPERVIVENCIA-COMPARACION DE MUESTRAS INDEPENDEINTES
SUP<-read.csv("C:/TESIS/ANOVA/SUPER.csv", header=T)
head(SUP)
## LOC.O PROC.O SUP.O X LOC.G PROC.G SUP.G X.1 AM TPO X71.19 AM.1 PLCC
## 1 MZ TPO 90.00 NA MZ PLCC 61.89 NA AM SMPO 71.19 AM SAC
## 2 MZ SMPO 78.17 NA MZ SAC 61.89 NA AM SMAO 69.30 AM PSLC
## 3 MZ SMAO 65.88 NA MZ PSLC 61.89 NA AM MZO 67.54 AM LLC
## 4 MZ MZO 69.30 NA MZ LLC 58.18 NA AM CMO 69.30 AM JC
## 5 MZ CMO 78.17 NA MZ JC 68.11 NA AM IJO 65.88 AM GNL
## 6 MZ IJO 69.30 NA MZ GNL 65.88 NA AM XO 69.30 AM EMQ
## X68.11
## 1 66.97
## 2 70.54
## 3 65.80
## 4 71.85
## 5 69.30
## 6 71.85
boxplot(SUP$SUP.G ~ SUP$LOC.G, xlab = "Contenedores", ylab = "crecimiento (cm)")
t.test(SUP$SUP.G ~ SUP$LOC.G, var.equal=T)#PRUEBA T PARA LAS LOCALIDADES
##
## Two Sample t-test
##
## data: SUP$SUP.G by SUP$LOC.G
## t = -5.7096, df = 24, p-value = 6.987e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -17.863624 -8.377914
## sample estimates:
## mean in group MZ mean in group TP
## 65.21615 78.33692
boxplot(SUP$SUP.G ~ SUP$PROC.G, xlab = "Contenedores", ylab = "crecimiento (cm)")
tapply(SUP$SUP.G, SUP$PROC.G,mean)#PROMEDIO DE LAS PROCEDENCIAS
## CDZH EMQ EPH GNL JC LAH LLC MH PLCC PSLC
## 81.030 72.210 73.425 69.570 72.210 70.185 67.245 69.100 69.100 75.945
## SAC TLQ XH
## 67.575 76.935 68.565
| PROCEDENCIAS | VALORES ARC | VALORES % |
|---|---|---|
| DCZH | 81.030 | 97.71 |
| EMQ | 72.210 | 90.66 |
| EPH | 73.425 | 91.84 |
| GNL | 69.570 | 87.74 |
| JC | 72.210 | 90.66 |
| LAH | 70.185 | 88.41 |
| LLC | 67.245 | 84.98 |
| MH | 69.100 | 87.27 |
| PLCC | 69.100 | 87.27 |
| PSJC | 75.945 | 94.07 |
| SAC | 67.575 | 85.36 |
| TLQ | 76.935 | 94.83 |
| XH | 68.565 | 86.57 |