Maximally compact sets is an approach to deriving relatively homogeneous
subsets of objects as determined by similarity of the composition of the objects. Maximally
compact sets are a covering, as opposed to a partition, of objects. The sets
so derived can be tested against random sets of the same size to determine whether a
vector of independent data exhibits an improbably restricted distribution within the sets.
Usage
maxpact(dist,size=NULL,alphac=NULL,mean=FALSE)
mps.test(mps, env, panel = 'all', main = deparse(substitute(env)), ...)
## S3 method for class 'mps'
plot(x, ...)
Arguments
dist
a dist object from dist, dsvdis, or vegdist
size
the size of desired compact sets
alphac
the alpha-cut to specify maximum dissimilarity for inclusion in a set
mean
if mean is FALSE (the default), the algorithm uses a furthest neighbor
criterion; if mean is TRUE, it uses a mean similarity criterion
mps
an object of class ‘mps’
env
a quantitative environmental variable for analysis
main
a title for the plot of mps.test
panel
an integer switch to indicate which panel to draw
x
an object of class ‘mps’ from maxpact
...
ancillary arguments for ‘plot’
Details
maxpact starts with each sample as a seed, and adds the most similar
plot to the set. Plots are added in turn to the set (up to the size specified,
or tto the maximum dissimilarity specified)
in order of maximum similarity. If mean is FALSE, the sample most similar to
set is the sample with the max-min similarity, that is, the sample whose minimum
similarity to the set if highest, equivalent to furthest-neighbor or
complete-linkage in cluster analysis. If mean is TRUE, the sample most similar
to a set is the sample with highest mean similarity to the set. Once the sets
are determined for each seed, the list is examined for duplicate sets, which are
deleted, to return the list of unique sets.
If ‘alphac’ is specified, sets are grown to maximum size, or to maximum
dissimilarity as specified by alphac, whichever is smaller.
The ‘mps.test’ function analyzes within-set variability in attributes
of the objects other than those used to calculate the similarity relation. If maximally compact
sets exhibit a narrower range of values than expected at random it may be that the
variable analyzed has an underlying role in determining the attributes on which the similarity
is calculated. The function ‘plot’ plots the sorted within-set range of values in red,
and the sorted
range of values of random sets of the same size in black. This followed by a boxplot of
within-set values for the random replicates versus the observed sets, and calculates a
Wilcoxon rank sum test of the difference.
Value
an object of class ‘mps’, a list with elements:
musubx
a matrix of sample membership in the sets where membership is given by the
similarity with which a sample joined the set
member
a list of set members in the order they were added to the set
numset
the number of unique sets derived
size
the number of members in each set
distname
the name of the dissimilarity/distance object employed