recluster.expl: Computes the dissimilarity contained in a distance matrix...

Description Usage Arguments Value Author(s) References Examples

View source: R/recluster.expl.R

Description

This function computes the fraction of the distances contained in a dissimilarity matrix which is explained by a clustering solution of the elements. The value is obtained by computing the sum of all the dissimilarity values among elements belonging to different clusters and divided by the sum of all the cells of the original dissimilarity matrix.

Usage

1
recluster.expl(mat, clust)

Arguments

mat

A dissimilarity matrix

clust

A clustering solution for the cases contained in the dissimilarity matrix.

Value

A number ranging between 0 and 1 indicating the fraction of explained dissimilarity.

Author(s)

Leonardo Dapporto

References

Holt, B.G. et al "An Update of Wallace's Zoogeographic Regions of the World." Science, 339:74-78.

Examples

1
2
3
4
5
data(datamod)
sor_tree<- recluster.cons(datamod, dist="sorensen")
sor_diss <- recluster.dist (datamod, dist="sorensen")
expl_diss <- recluster.expl.diss (sor_tree$cons,sor_diss)
expl_diss 

Example output

Loading required package: ape
$matrix
     [,1] [,2] [,3] [,4] [,5] [,6] [,7]
A       1    2    3    3    4    5    5
B       1    2    3    3    4    4    4
lint    1    1    1    1    2    2    2
sint    2    3    4    4    5    6    6
xint    2    3    4    4    5    6    6
lA      1    1    2    2    3    3    3
lB      1    1    1    1    1    1    1
sA      2    3    4    5    6    7    8
sB      2    3    4    5    6    7    7

$expl.div
[1] 0.7100320 0.8505178 0.8862664 0.9511436 0.9670318 0.9809341 0.9920559

$nclust
[1] 2 3 4 5 6 7 8

recluster documentation built on July 27, 2020, 1:15 a.m.