Professional Documents
Culture Documents
Rosana Ferrero
5 de febrero de 2014
ndice
1. Anlisis cluster con R: datos de peces (ambos mtodos).
1.1. Anlisis jerrquico . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1. PASO 1. Eleccin de variables (o casos) . . . . . . . . . . .
1.1.2. PASO 2. Eleccin de la tcnica cluster . . . . . . . . . . . .
1.1.3. PASO 3: Determinar el nmero de conglomerados finales
1.1.4. PASO 4. Representacin e interpretacin de los resultados
1.2. Anlisis no jerrquico . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.1. Particin por k-medias . . . . . . . . . . . . . . . . . . . . .
1.2.2. k-medoides (PAM) . . . . . . . . . . . . . . . . . . . . . . .
1.3. PLUS: Anlisis extra para mejorar la interpretacin y validacin.
1.3.1. Comparacin con datos ambientales. . . . . . . . . . . . .
1.3.2. Ensables de especies . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
2
2
3
6
11
12
12
15
21
21
28
1.
Anlisis cluster jerrquico y no jerrquico para datos de abundancia de peces a lo largo del ro Doubs
(francs-suizo) obtenidos por Verneaux (1973) y las caractersticas ambientales del sitio. Se quiere analizar:
a) Si existen distintos ensambles de peces a lo largo del cauce del ro. b) Cmo los cambios ambientales
registrados en el ro se relacionan con los cambios en la estructura de los ensambles de peces. Tenemos
30 filas (sitios), 27 especies de peces (columnas del archivo spe), 11 variables ambientales (columnas del
archivo env) y las coordenadas espaciales de los sitios (columnas del archivo spa). Para obtener ms detalles
de los datos puedes preguntar en R sobre los datos doubs del paquete ade4.
1.1.
Anlisis jerrquico
# --------- Anlisis jerrquico --------# cargamos los paquetes que vamos a necesitar (activar vegan luego de
# ade4 para evitar conflictos)
library(ade4)
library(vegan)
library(gclus)
library(cluster)
library(RColorBrewer)
library(labdsv)
library(mvpart)
library(MVPARTwrap)
## Warning: replacing previous import ccawhen loading de4
# cargamos algunas funciones que hemos de necesitar (los archivos
# deben estar en nuestro directorio de trabajo)
source("hcoplot.R")
source("test.a.R")
source("coldiss.R")
1.1.1.
1.1.2.
# Average
spe.ch.UPGMA.coph <- cophenetic(spe.ch.UPGMA)
cor(spe.ch, spe.ch.UPGMA.coph)
## [1] 0.8608
# Ward
spe.ch.ward.coph <- cophenetic(spe.ch.ward)
cor(spe.ch, spe.ch.ward.coph)
## [1] 0.7985
cor(spe.ch, spe.ch.ward.coph, method = "spearman")
## [1] 0.7661
# el mayor coeficiente de correlacin cofentica corresponde al
# mtodo UPGMA
# Diagrama de Shepard ---- Para ilustrar las relaciones entre la
# matriz de distancias original y la matriz de distancias cofentica
par(mfrow = c(2, 2))
plot(spe.ch, spe.ch.single.coph, xlab = "Chord distance", ylab = "Cophenetic distance",
asp = 1, xlim = c(0, sqrt(2)), ylim = c(0, sqrt(2)), main = c("Single linkage",
paste("Cophenetic correlation =", round(cor(spe.ch, spe.ch.single.coph),
3))))
abline(0, 1)
lines(lowess(spe.ch, spe.ch.single.coph), col = "red")
plot(spe.ch, spe.ch.comp.coph, xlab = "Chord distance", ylab = "Cophenetic distance",
asp = 1, xlim = c(0, sqrt(2)), ylim = c(0, sqrt(2)), main = c("Complete linkage",
paste("Cophenetic correlation =", round(cor(spe.ch, spe.ch.comp.coph),
3))))
abline(0, 1)
lines(lowess(spe.ch, spe.ch.comp.coph), col = "red")
plot(spe.ch, spe.ch.UPGMA.coph, xlab = "Chord distance", ylab = "Cophenetic distance",
asp = 1, xlim = c(0, sqrt(2)), ylim = c(0, sqrt(2)), main = c("UPGMA",
paste("Cophenetic correlation =", round(cor(spe.ch, spe.ch.UPGMA.coph),
3))))
abline(0, 1)
lines(lowess(spe.ch, spe.ch.UPGMA.coph), col = "red")
plot(spe.ch, spe.ch.ward.coph, xlab = "Chord distance", ylab = "Cophenetic distance",
asp = 1, xlim = c(0, sqrt(2)), ylim = c(0, max(spe.ch.ward$height)),
main = c("Ward clustering", paste("Cophenetic correlation =", round(cor(spe.ch,
spe.ch.ward.coph), 3))))
abline(0, 1)
lines(lowess(spe.ch, spe.ch.ward.coph), col = "red")
# Distancia de Gower (1983) -----(gow.dist.single <- sum((spe.ch - spe.ch.single.coph)^2))
## [1] 95.41
(gow.dist.comp <- sum((spe.ch - spe.ch.comp.coph)^2))
4
## [1] 40.49
(gow.dist.UPGMA <- sum((spe.ch - spe.ch.UPGMA.coph)^2))
## [1] 11.67
(gow.dist.ward <- sum((spe.ch - spe.ch.ward.coph)^2))
## [1] 532
# segn la distancia de Gower, el mejor mtodo es UPGMA
# por tanto, seleccionaramos los resultados del mtodo UPGMA sin
# embargo, para comparar el mtodo con anlisis posteriores, aqu
# vamos a seleccionar el mtodo Ward
1.2
1.0
1
9
spe.ch
hclust (*, "complete")
spe.ch
hclust (*, "average")
Cluster Dendrogram
Cluster Dendrogram
Cluster Dendrogram
1
15
16
19
17
18
2
3
7
10
4
6
13
14
11
12
5
9
UPGMA
Cophenetic correlation = 0.861
Ward clustering
Cophenetic correlation = 0.799
1.0
0.0
1.2
0.8
0.4
2.0
Chord distance
Cophenetic distance
Chord distance
Chord distance
1.1.3.
20
21
22
26
27
28
29
30
25
23
24
1.2
0.8
0.4
0.0
0.0
1.5
Height
spe.ch
hclust (*, "ward")
Complete linkage
Cophenetic correlation = 0.766
Cophenetic distance
1.2
0.8
0.4
0.0
Cophenetic distance
Cophenetic distance
1.0
spe.ch
hclust (*, "ward")
Single linkage
Cophenetic correlation = 0.599
0.5
20
21
22
26
27
28
29
30
25
23
24
5
9
15
16
19
17
18
2
3
7
10
4
6
1
13
14
11
12
3
7
2
spe.ch
hclust (*, "centroid")
0.0
Height
11
13
14
6
4
12
20
30
26
29
21
22
27
28
17
18
25
23
24
15
10
19
16
9
5
0.5
0.1
0.3
Height
2.0
0.7
2.5
spe.ch
hclust (*, "single")
17
18
26
27
28
29
21
22
13
14
4
6
12
2
3
7
11
15
16
19
10
25
23
24
Height
0.6
20
30
0.2
0.2
12
2
3
7
11
13
14
15
16
10
4
6
19
17
18
29
30
20
21
22
26
27
28
25
23
24
0.4
1
0.6
23
24
12
4
6
2
3
7
13
14
30
20
21
22
29
26
27
28
17
18
11
19
16
15
10
25
Height
0.8
1.0
5
1
0.6
0.4
0.2
Height
Cluster Dendrogram
1.4
Cluster Dendrogram
0.8
Cluster Dendrogram
0
Chord distance
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
k
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
r
0.0000
0.6554
0.7081
0.7155
0.6429
0.6741
0.6865
0.6879
0.6926
0.6499
0.6464
0.6396
0.6304
0.5009
0.4960
0.4375
0.4027
0.3950
0.3852
0.3571
0.3424
0.3271
0.3111
0.2931
0.2512
0.1971
0.1615
0.1149
0.0000
30
20
15
19
18
17
16
15
14
13
12
11
10
k (number of clusters)
25
29
28
27
26
25
24
23
22
21
20
10
9
8
7
6
5
4
3
2
0.5
1.0
1.5
2.0
2.5
h (node height)
0.2
0.1
0.0
0.3
optimum
2
10
15
k (number of groups)
20
25
30
0.5
0.4
0.3
0.2
0.0
0.1
Pearson's correlation
0.6
0.7
optimum
4 5
10
15
20
25
k (number of groups)
Validacin final
# Validacin final Grfico de silueta para la particin final
# -------- Vemos si los miembros de los grupos estn bien
# clasificados
# para 4 clusters
k <- 4
# graficamos la silueta
cutg <- cutree(spe.ch.ward, k = k)
sil <- silhouette(cutg, spe.ch)
rownames(sil) <- row.names(spe)
plot(sil, main = "Silhouette plot - Chord - Ward", cex.names = 0.8, col = 2:(k +
1), nmax = 100)
# los grupos 1 y 3 son bastante coherentes, mientras que el grupo 2
# contiene algunos miembros mal clasificados
10
30
n = 29
2
3
12
7
11
13
4
14
1
6
10
17
16
9
18
5
19
15
21
22
27
29
28
30
26
20
23
24
25
1 : 11 | 0.37
2 : 7 | 0.04
3 : 8 | 0.60
4 : 3 | 0.34
0.0
0.2
0.4
0.6
0.8
Silhouette width si
Average silhouette width : 0.35
1.1.4.
11
1.0
23
200
22
21
20 19
26
16
15
13
28
150
17
14
27
y coordinate (km)
18
29
12
30
11
Downstream
100
10
9
50
7
6
Upstream
100
Cluster 1
Cluster 2
Cluster 3
Cluster 4
5
4
3
100
200
300
x coordinate (km)
1.2.
Anlisis no jerrquico
1.2.1.
#
#
#
#
#
# con 4 grupos
set.seed(1)
spe.kmeans <- kmeans(spe.norm, centers = 4, nstart = 100)
# Comparacin con la clasificacin de Ward con 4 grupos
table(spe.kmeans$cluster, spebc.ward.g)
##
##
##
##
##
##
spebc.ward.g
1 2 3 4
1 0 0 0 3
2 11 1 0 0
3 0 6 0 0
4 0 0 8 0
criterion = "ssi")
summary(spe.KM.cascade)
##
##
##
##
##
Length
partition 261
results
18
criterion
1
size
90
Class
-none-none-none-none-
Mode
numeric
numeric
character
numeric
spe.KM.cascade$results
##
##
##
##
##
##
1
2
3
4
5
6
1
2
3
4
5
6
23
24
25
1
2
CHA TRU VAI LOC OMB BLA HOT TOX VAN CHE BAR SPI GOU BRO PER BOU
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
2
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
2
1
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
4
3
0
0
0
0
0
0
0
0
0
0
0
0
13
##
##
##
##
##
##
##
##
0
5
5
5
0
0
0
0
0
0
0
PSO ROT CAR TAN BCO PCH GRE GAR BBO ABL ANG
23
0
0
0
0
0
0
0
1
0
2
0
24
1
0
0
0
0
0
2
2
1
5
0
25
0
1
0
0
0
0
1
1
0
3
0
1
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
222
111111 111122222223
34512346701234559678901267890
TRU ...3554351355542.321.......1.
CHA ..........12233..211.........
OMB ..........12342...11.......1.
VAI ....4554444455431343311....1.
LOC ....355554142452354352111111.
BLA ............234..5211......1.
CHE 121...121211.1325223132423443
VAN ..1....112....35.532222312233
ABL 253...............22355555555
GOU .12...11.1...122.212445534455
TOX .................4433222.1122
BRO ..1..121.....1.4.111123324354
GAR 121....1.......54122555545555
PER ......21.......4.123123411245
HOT .1................11222311121
TAN ......12......131111244435435
BAR .............12..233244524353
SPI .................143232111135
GRE .21................1123445555
ROT ..1............2....122211225
PSO .1...............111122323453
CAR .................111112312435
BOU ..................12233323455
BBO .1..................123424545
ANG ..................11122223445
BCO ....................113423345
PCH ......................1212345
sites species
29
27
head(spe[ord.KM$sites, ord.KM$species])
##
##
##
##
##
##
##
23
24
25
1
2
3
TRU CHA OMB VAI LOC BLA CHE VAN ABL GOU TOX BRO GAR PER HOT TAN
0
0
0
0
0
0
1
0
2
0
0
0
1
0
0
0
0
0
0
0
0
0
2
0
5
1
0
0
2
0
1
0
0
0
0
0
0
0
1
1
3
2
0
1
1
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
0
4
3
0
0
0
0
0
0
0
0
0
0
0
5
0
0
5
5
0
0
0
0
0
0
1
0
0
0
0
14
##
##
##
##
##
##
##
23
24
25
1
2
3
BAR SPI GRE ROT PSO CAR BOU BBO ANG BCO PCH
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
1
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
2
3
4
CHA
0.00000
0.10380
0.06168
0.00000
TRU
0.000000
0.542301
0.122088
0.006691
VAI
0.00000
0.50087
0.26994
0.02506
LOC
0.00000
0.43326
0.35943
0.06987
OMB
0.000000
0.114024
0.032665
0.006691
ssi
criterion
10
2
10
8
6
4
2
10
15
20
Objects
1.2.2.
25
0.08
0.12
Values
k-medoides (PAM)
15
0.16
#
#
#
#
#
#
# graficamos
plot(1:nrow(spe), asw, type = "h", main = "Choice of the number of clusters",
xlab = "k (number of clusters)", ylab = "Average silhouette width")
axis(1, k.best, paste("optimum", k.best, sep = "\n"), col = "red", font = 2,
col.axis = "red")
points(k.best, max(asw), pch = 16, col = "red", cex = 1.5)
# la opcin ptima para PAM es k=2 con asw=0.3841
# Si an as elegimos k=4 clusters para comparar con los anteriores
# mtodos
spe.ch.pam <- pam(spe.ch, k = 4, diss = TRUE)
summary(spe.ch.pam)
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
Medoids:
ID
[1,] "11" "12"
[2,] "6" "6"
[3,] "16" "17"
[4,] "25" "26"
Clustering vector:
1 2 3 4 5 6 7
1 1 1 2 2 2 1
25 26 27 28 29 30
4 4 4 4 4 4
Objective function:
build
swap
0.4426 0.4391
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
2 2 1 1 1 1 1 3 3 3 3 4 4 4 4 4
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
Isolated clusters:
L-clusters: character(0)
L*-clusters: character(0)
Silhouette plot information:
cluster neighbor sil_width
13
1
2
0.42989
12
1
2
0.40576
2
1
2
0.38341
14
1
2
0.35676
11
1
2
0.34189
3
1
2
0.27044
1
1
2
0.24590
7
1
2
0.24136
15
1
3
0.05062
6
2
1
0.09344
10
2
1
0.06179
9
2
3
0.04917
5
2
3 -0.03817
4
2
1 -0.14709
17
3
2
0.45358
18
3
4
0.38401
16
3
2
0.23661
19
3
4
0.15365
26
4
3
0.48031
27
4
3
0.46381
28
4
3
0.45850
22
4
3
0.41331
21
4
3
0.39376
29
4
3
0.36427
30
4
3
0.36421
24
4
3
0.31070
25
4
3
0.26599
20
4
3
0.23650
23
4
3
0.21030
Average silhouette width per cluster:
[1] 0.302892 0.003827 0.306963 0.360150
Average silhouette width of total data set:
[1] 0.2736
Available components:
[1] "medoids"
"id.med"
[6] "clusinfo"
"silinfo"
"clustering" "objective"
"diss"
"call"
13
12
2
14
11
"isolation"
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
3
1
7
15
6
10
9
5
4
17
18
16
19
26
27
28
22
21
29
30
24
25
20
23
1
1
1
1
2
2
2
2
2
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
2
2
2
3
1
1
3
3
1
2
4
2
4
3
3
3
3
3
3
3
3
3
3
3
0.27044
0.24590
0.24136
0.05062
0.09344
0.06179
0.04917
-0.03817
-0.14709
0.45358
0.38401
0.23661
0.15365
0.48031
0.46381
0.45850
0.41331
0.39376
0.36427
0.36421
0.31070
0.26599
0.23650
0.21030
19
0.3
0.2
0.1
0.0
optimum
2
10
15
20
25
30
k (number of clusters)
4 clusters Cj
j : n1j | :ave
si
3 iCj
| 0.34
n = 29
23
24
25
2
12
3
7
11
13
14
4
1
6
10
15
17
18
16
9
5
19
22
21
27
28
29
30
26
20
13
12
2
14
11
3
1
7
15
6
10
9
5
4
17
18
16
19
26
27
28
22
21
29
30
24
25
20
23
2 : 12 | 0.37
3 : 6 | 0.08
4 : 8 | 0.59
0.0
0.2
0.4
0.6
0.8
4 clusters Cj
j : nj | aveiCj si
n = 29
1.0
1 : 9 | 0.30
2 : 5 | 0.004
3 : 4 | 0.31
4 : 11 | 0.36
0.0
Silhouette width si
0.2
0.4
0.6
0.8
Silhouette width si
20
1.0
29
27
28
26
30
Downstream
7
6
5
4
3
Upstream
12
50
25
y coordinate (km)
50
2423
22
17 16
21
2019 18 15
14
13
12
11
10
Cluster 1
Cluster 2
Cluster 3
Cluster 4
1.3.
1.3.1.
attach(env)
21
##
##
##
##
##
##
##
4-1
3-1
2-1
3-4
2-4
2-3
diff
0.1064
0.5881
1.8129
0.4817
1.7066
1.2249
lwr
-1.58638
-1.17995
0.19896
-0.86865
0.56530
-0.02533
upr
1.799
2.356
3.427
1.832
2.848
2.475
p adj
0.9981
0.7971
0.0235
0.7613
0.0020
0.0563
plot(TukeyHSD(fm1))
TukeyHSD(fm2, ordered = TRUE)
##
##
##
##
##
##
##
##
##
##
##
##
##
##
plot(TukeyHSD(fm2))
TukeyHSD(fm3, ordered = TRUE)
##
##
##
##
##
##
##
##
##
##
##
##
##
##
plot(TukeyHSD(fm3))
kruskalmc(alt ~ as.factor(spe.kmeans$cluster))
##
##
##
##
##
##
##
## 2-3
## 2-4
## 3-4
5.500
16.708
11.208
11.23
10.25
12.13
FALSE
TRUE
FALSE
detach(env)
#
#
#
#
#
#
#
#
#
#
#
#
1
2
3
4
1
0
7
2
0
2
0
4
4
3
3
1
0
0
5
4
2
1
0
0
# agregamos nombres
rownames(tab) <- c("sp_c1", "sp_c2", "sp_c3", "sp_c4")
colnames(tab) <- c("env_c1", "env_c2", "env_c3", "env_c4")
# Prueba de independencia Chi-cuadrado. Ho: X e Y son variables
# independientes.
(M1 <- chisq.test(tab))
## Pearson's Chi-squared test with tab
## X-squared = 30.23, df = 9, p-value = 0.0004014
# con test de permutacin
(M2 <- chisq.test(tab, simulate.p.value = TRUE))
## Pearson's Chi-squared test with simulated p-value
##
(based on 2000 replicates) with tab
## X-squared = 30.23, df = NA, p-value = 0.0004998
25
chisqPostHoc(M2)
##
##
##
##
##
##
##
##
#
#
#
#
fdr method.
adj.p
NaN
0.0054
NaN
0.0322
0.0322
NaN
Adjusted p-values
comparison
1 sp_c1 vs. sp_c2
2 sp_c1 vs. sp_c3
3 sp_c1 vs. sp_c4
4 sp_c2 vs. sp_c3
5 sp_c2 vs. sp_c4
6 sp_c3 vs. sp_c4
produce NaN cuando hay ceros en los datos Para columnas, vemos que
existen diferencias significativas entre 1-3, 1-4, 2-3. Para
filas, vemos que existen diferencias significativas entre 1-2, 1-3,
2-4.
26
Altitude
Slope
4
30
3
2
log(pen)
sqrt(alt)
25
20
1
0
1
15
Oxygen
Ammonium
12
1.2
1.0
sqrt(amm)
0.8
0.6
0.4
6
0.2
0.0
4
1
31
41
32
42
43
42
32
41
31
21
21
43
oxy
10
27
1.3.2.
Ensables de especies
1) Abundancias medias en los clusters de sitios (k-means) ------Calcularemos estadsticos simples (abundancias medias) a partir de
las tipologas obtenidas con el anlisis cluster, y miraremos qu
especies estn presentes en mayor abundancia o qu especies son
especficas de cada cluster de sitios
## LOC GAR VAI VAN CHE TOX GOU PER BAR SPI BLA TAN TRU BRO
## 3.67 3.17 2.83 2.83 2.50 2.33 1.83 1.83 1.67 1.67 1.50 1.50 1.33 1.33
## ABL BOU CHA HOT PSO CAR ROT ANG OMB GRE BCO BBO PCH
## 1.17 0.83 0.67 0.67 0.67 0.67 0.50 0.50 0.33 0.33 0.17 0.17 0.00
group3.domin
## LOC GAR VAI VAN CHE TOX GOU PER BAR SPI BLA TAN
##
1
2
3
4
5
6
7
8
9 10 11 12
group4.domin <- which(group4 > mean(group4))
group4 #para el grupo 4
## ABL GAR GOU GRE TAN BAR BBO BOU BRO CHE BCO PSO ANG PER
## 5.00 4.88 4.38 4.12 4.00 3.75 3.62 3.50 3.25 3.12 3.12 3.00 3.00 2.75
## CAR VAN PCH SPI ROT HOT TOX LOC VAI TRU OMB BLA CHA
## 2.62 2.25 2.25 2.12 2.12 1.62 1.50 1.00 0.38 0.12 0.12 0.12 0.00
group4.domin
## ABL GAR GOU GRE TAN BAR BBO BOU BRO CHE BCO PSO ANG PER CAR
##
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
$Concordance_analysis
W
F
Prob.F
Corrected prob.F
Chi2
Prob.perm
Corrected prob.perm
Group.1
4.545e-01
1.333e+01
5.222e-43
1.044e-42
2.164e+02
1.000e-03
2.000e-03
Group.2
8.364e-01
1.022e+01
3.487e-13
3.487e-13
7.026e+01
1.000e-03
2.000e-03
$Correction.type
[1] "holm"
attr(,"class")
[1] "kendall.global"
Miramos los p-valores corregidos para el test de permutacin como
ambos grupos tienen p<0.05, decimos que todos los grupos son
significativos a nivel global i.e. de manera global, contienen
especies que son concordantes (al menos algunas especies son
concordantes) Si no fuera significativo para algunos grupos,
indicara que esos grupos deberan ser subdivididos en menores
grupos.
$A_posteriori_tests_Group
$A_posteriori_tests_Group[[1]]
GAR
ABL
CHE
GOU
TAN
VAN
BAR
Spearman.mean 0.3777 0.4563 -0.09825 0.4707 0.4288 0.2341 0.4528
W.per.species 0.4143 0.4883 -0.03365 0.5019 0.4624 0.2792 0.4850
Prob
0.0018 0.0002 0.75900 0.0001 0.0001 0.0413 0.0004
30
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
0.0020
GRE
0.5156
0.5441
0.0001
0.0020
TOX
0.4729
0.5040
0.0001
0.0020
$A_posteriori_tests_Group[[2]]
LOC
VAI
TRU
Spearman.mean 0.7414 0.8232 0.6976
W.per.species 0.8276 0.8822 0.7984
Prob
0.0001 0.0001 0.0001
Corrected prob 0.0020 0.0020 0.0020
$Correction.type
[1] "holm"
attr(,"class")
[1] "kendall.post"
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
7
1
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3
$relfrq
CHA
TRU
VAI
LOC
OMB
BLA
HOT
TOX
VAN
CHE
BAR
SPI
GOU
BRO
PER
BOU
PSO
ROT
CAR
TAN
BCO
PCH
GRE
GAR
BBO
ABL
ANG
1
0.000
0.875
0.875
0.875
0.000
0.000
0.000
0.000
0.375
0.625
0.000
0.000
0.375
0.500
0.375
0.000
0.000
0.125
0.000
0.500
0.000
0.000
0.000
0.375
0.000
0.000
0.000
2
0.8
0.9
1.0
1.0
0.7
0.7
0.3
0.4
0.6
0.9
0.6
0.4
0.7
0.5
0.4
0.3
0.4
0.1
0.4
0.5
0.1
0.0
0.2
0.4
0.1
0.3
0.3
3
0.0000
0.0000
0.3333
0.5000
0.0000
0.0000
0.6667
0.5000
0.6667
1.0000
0.5000
0.5000
0.8333
0.6667
0.5000
0.5000
0.6667
0.6667
0.5000
0.5000
0.5000
0.3333
0.8333
1.0000
0.6667
1.0000
0.5000
4
0.0
0.2
0.2
0.8
0.2
0.2
1.0
0.8
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
$relabu
1
2
3
4
CHA 0.00000 1.00000 0.00000 0.00000
TRU 0.52124 0.44788 0.00000 0.03089
VAI 0.42299 0.50759 0.04338 0.02603
32
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
LOC
OMB
BLA
HOT
TOX
VAN
CHE
BAR
SPI
GOU
BRO
PER
BOU
PSO
ROT
CAR
TAN
BCO
PCH
GRE
GAR
BBO
ABL
ANG
0.40385
0.00000
0.00000
0.00000
0.00000
0.14325
0.16484
0.00000
0.00000
0.05660
0.15152
0.15419
0.00000
0.00000
0.06726
0.00000
0.11706
0.00000
0.00000
0.00000
0.12235
0.00000
0.00000
0.00000
$indval
CHA
TRU
VAI
LOC
OMB
BLA
HOT
TOX
VAN
CHE
BAR
SPI
GOU
BRO
PER
BOU
PSO
ROT
CAR
TAN
BCO
PCH
GRE
GAR
BBO
ABL
ANG
1
0.000000
0.456081
0.370119
0.353365
0.000000
0.000000
0.000000
0.000000
0.053718
0.103022
0.000000
0.000000
0.021226
0.075758
0.057819
0.000000
0.000000
0.008408
0.000000
0.058528
0.000000
0.000000
0.000000
0.045881
0.000000
0.000000
0.000000
0.42692
0.87500
0.90000
0.13636
0.38889
0.27831
0.19181
0.18932
0.23810
0.14717
0.07576
0.12335
0.08621
0.07792
0.02691
0.09091
0.08027
0.02069
0.00000
0.02857
0.09788
0.01734
0.07095
0.06122
0.07692
0.00000
0.00000
0.45455
0.27778
0.21828
0.25974
0.31553
0.23810
0.32075
0.22727
0.26432
0.25862
0.25974
0.31390
0.22727
0.26756
0.27586
0.14286
0.28571
0.30995
0.28902
0.42230
0.20408
2
0.800000
0.403089
0.507592
0.426923
0.612500
0.630000
0.040909
0.155556
0.166985
0.172627
0.113592
0.095238
0.103019
0.037879
0.049339
0.025862
0.031169
0.002691
0.036364
0.040134
0.002069
0.000000
0.005714
0.039152
0.001734
0.021284
0.018367
0.09231
0.12500
0.10000
0.40909
0.33333
0.36016
0.38362
0.49515
0.52381
0.47547
0.54545
0.45815
0.65517
0.66234
0.59193
0.68182
0.53512
0.70345
0.85714
0.68571
0.46982
0.69364
0.50676
0.73469
3
0.00000
0.00000
0.01446
0.03846
0.00000
0.00000
0.30303
0.13889
0.14552
0.25974
0.15777
0.11905
0.26730
0.15152
0.13216
0.12931
0.17316
0.20927
0.11364
0.13378
0.13793
0.04762
0.23810
0.30995
0.19268
0.42230
0.10204
4
0.000000
0.006178
0.005206
0.073846
0.025000
0.020000
0.409091
0.266667
0.360164
0.383616
0.495146
0.523810
0.475472
0.545455
0.458150
0.655172
0.662338
0.591928
0.681818
0.535117
0.703448
0.857143
0.685714
0.469821
0.693642
0.506757
0.734694
33
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
##
$maxcls
CHA TRU VAI LOC OMB BLA HOT TOX VAN CHE BAR SPI GOU BRO PER BOU PSO
2
1
2
2
2
2
4
4
4
4
4
4
4
4
4
4
4
ROT CAR TAN BCO PCH GRE GAR BBO ABL ANG
4
4
4
4
4
4
4
4
4
4
$indcls
CHA
TRU
VAI
LOC
OMB
BLA
HOT
TOX
VAN
CHE
0.8000 0.4561 0.5076 0.4269 0.6125 0.6300 0.4091 0.2667 0.3602 0.3836
BAR
SPI
GOU
BRO
PER
BOU
PSO
ROT
CAR
TAN
0.4951 0.5238 0.4755 0.5455 0.4581 0.6552 0.6623 0.5919 0.6818 0.5351
BCO
PCH
GRE
GAR
BBO
ABL
ANG
0.7034 0.8571 0.6857 0.4698 0.6936 0.5068 0.7347
$pval
CHA
TRU
VAI
LOC
OMB
BLA
HOT
TOX
VAN
CHE
BAR
0.001 0.021 0.001 0.011 0.007 0.005 0.052 0.283 0.128 0.029 0.009
SPI
GOU
BRO
PER
BOU
PSO
ROT
CAR
TAN
BCO
PCH
0.013 0.009 0.006 0.031 0.001 0.001 0.007 0.001 0.001 0.003 0.001
GRE
GAR
BBO
ABL
ANG
0.002 0.015 0.001 0.009 0.001
attr(,"class")
[1] "indval"
TRU
CHA
BLA
OMB
VAI
LOC
PCH
ANG
BCO
BBO
GRE
CAR
PSO
BOU
group
1
2
2
2
2
2
4
4
4
4
4
4
4
4
##
##
##
##
##
##
##
##
##
##
#
#
#
#
ROT
BRO
TAN
SPI
ABL
BAR
GOU
GAR
PER
CHE
4
4
4
4
4
4
4
4
4
4
0.5919
0.5455
0.5351
0.5238
0.5068
0.4951
0.4755
0.4698
0.4581
0.3836
0.007
0.006
0.001
0.013
0.009
0.009
0.009
0.015
0.031
0.029
11
18
17
12
14
14
20
18
15
25
35
calinski
criterion
8
7
6
2
6
5
4
3
2
10
15
Objects
20
8.0
9.0 10.0
Values
36