Skip to contents

Analyzes how lower level clusters are assigned into upper level ones. The analysis is made for several number of clusters.

Usage

relate.levels(lower, upper, defuzzify = FALSE, excludeFixed = FALSE, verbose=FALSE, ...)

Arguments

lower

A list of objects of type vegclust or vegclass that represent classifications at a finer level of resolution.

upper

A list of objects of type vegclust or vegclass that represent classifications at an broader level of resolution.

defuzzify

A logical flag used to indicate whether the result of calling crossmemb should be deffuzified.

excludeFixed

A logical used to indicate whether fixed clusters should be excluded from the comparison of levels.

verbose

A flag used to ask for extra screen output.

...

Additional parameters for function defuzzify.

Details

For each pair of vegclust (or vegclass) objects in upper and lower, the function calls function crossmemb and then, if asked, deffuzifies the resulting memberships (by calling function defuzzify) and several quantities are calculated (see 'value' section).

Value

A list with several data frames (see below). In each of them, the rows are items of upper and columns are items of lower. The names of rows and columns are the number of clusters of each vegclust (or vegclass) object.

nnoise

The number of low level clusters that are assigned to the Noise class (for upper objects using Noise clustering).

maxnoise

The maximum membership value of low level clusters to the Noise class (for upper objects using Noise clustering).

minmaxall

The minimum value (across upper level clusters) of the maximum membership value observed among the lower level clusters.

minallsize

The minimum value (across upper level clusters) of the sum of membership values across lower level clusters.

empty

The number of upper level clusters (mobile or fixed) that do not have any member among the lower level clusters.

Author

Miquel De Cáceres, CREAF

Examples

## Loads data  
data(wetland)
  
## This equals the chord transformation 
## (see also  \code{\link{decostand}} in package vegan)
wetland.chord = as.data.frame(sweep(as.matrix(wetland), 1,
                              sqrt(rowSums(as.matrix(wetland)^2)), "/"))

## Create noise clustering from hierarchical clustering at different number of cluster
wetland.hc = hclust(dist(wetland.chord),method="ward") 
#> The "ward" method has been renamed to "ward.D"; note new "ward.D2"
wetland.nc1 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=6, m = 1.2, 
                            dnoise=0.75, method="NC")
#> PROCESSING 2 MOBILE CLUSTERS
#> PROCESSING 3 MOBILE CLUSTERS
#> PROCESSING 4 MOBILE CLUSTERS
#> PROCESSING 5 MOBILE CLUSTERS
#> PROCESSING 6 MOBILE CLUSTERS
wetland.nc2 = hier.vegclust(wetland.chord, wetland.hc, cmin=2, cmax=4, m = 1.2, 
                            dnoise=0.85, method="NC")
#> PROCESSING 2 MOBILE CLUSTERS
#> PROCESSING 3 MOBILE CLUSTERS
#> PROCESSING 4 MOBILE CLUSTERS

## Studies the assignment of levels
relate.levels(wetland.nc1, wetland.nc2, method="cut")
#> $nnoise
#>   2 3 4 5 6
#> 2 0 0 0 0 0
#> 3 0 0 0 0 0
#> 4 0 0 0 0 0
#> 
#> $maxnoise
#>           2         3         4         5         6
#> 2 0.2984744 0.3346209 0.3453526 0.3546016 0.3599861
#> 3 0.2210616 0.2450804 0.2495569 0.2527256 0.2544382
#> 4 0.1776647 0.1947259 0.1975170 0.1988938 0.1994356
#> 
#> $minallsize
#>           2         3         4         5        6
#> 2 0.6930967 1.0374315 1.3734906 1.7142786 2.061993
#> 3 0.4420566 0.6855948 0.9245805 1.1619556 1.395296
#> 4 0.3406583 0.5351497 0.7243590 0.9123155 1.095565
#> 
#> $minmaxall
#>           2         3         4         5         6
#> 2 0.4263304 0.4458496 0.4610996 0.4679672 0.4628289
#> 3 0.2294265 0.2663072 0.2816723 0.2972760 0.3070570
#> 4 0.1810541 0.2069985 0.2081818 0.2106483 0.2111411
#> 
#> $empty
#>   2 3 4 5 6
#> 2 0 0 0 0 0
#> 3 1 0 0 0 0
#> 4 2 1 1 1 1
#>