stride proceeds along a specified sequence creating clusterings or partitions of a dissimilarity matrix for each value of the sequence.
stride(seq,arg2,type='pam',numrep=10,maxitr=100)
# S3 method for stride
plot(x, dist, col2=4, …)
a sequence, in either a:b or seq(a,b,c) form
if arg2 is an object of class ‘dist’, type specifies the algorithm to produce clusters, and can be either ‘pam’ or ‘optpart’.
if arg2 is an object of class ‘dist’ and type =
‘optpart’, numrep specifies the number of replicates to run in function
optpart
.
if arg2 is an object of class ‘dist’ and type =
‘optpart’ numrep specifies the maximum number of iterations per replicate
in function
optpart
an object of class ‘stride’
the color code for the second line in the graph
ancillary arguments to the plot function
an object of class ‘stride’, which is a list with components:
a data.frame with items as rows, and cluster IDs as columns, with one column for each value of the sequence
a copy of the sequence employed
The specific action of function stride depends on the class of the second
argument. If arg2 is of class ‘dist’, then clusters are generated by
a fixed cluster algorithm. In this case, if type is ‘pam’, the
function pam
is called to
produce the clusters. If type is ‘optpart’ the function
optpart
is called to produce the clusters.
If arg2 is of class ‘hclust’, then the hlcust object is successively
‘sliced’ at levels specified by the sequence. The object of class
‘hclust’ can result from the function hclust
using any of the
methods provided, or by casting an object of class ‘partition’ to class
‘hlcust’ with the as.hclust
function.
The default plot method for a stride plots the partana ratios
(see partana
) of each partition of the sequence on the left Y axis,
and the silhouette widths of the same partitions on the right Y axis.
# NOT RUN {
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray')
results <- stride(2:5,dis.bc)
# }
Run the code above in your browser using DataLab