Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

DendSer

Implements dendrogram seriation


Description

Implements dendrogram seriation.

Usage

DendSer(h, ser_weight, cost = costBAR, node_op = NULL, costArg = NULL, 
maxloops = NULL, saveinfo = FALSE, direction = NULL,  GW=NULL,...)

Arguments

h

An object of class hclust

ser_weight

Used by cost function to evaluate ordering. For cost=costLS, this is a vector of object weights. Otherwise is a dist or symmetric matrix.

cost

Function used to evaluate permutation.Current choices are costLS, costPL, costLPL, costED, costARc, costBAR.

node_op

Function used to reorder branches at a dendrogram node. DendSer picks default depending on cost function. NULL means use default depending on cost.

costArg

Other args for cost function.

maxloops

Maximum number of iterations allowed. NULL means use default depending on cost.

saveinfo

Logical, whether info associated with search is saved.

direction

Order of visiting nodes. Values are "up" or "down", for nodes in order of increasing or decreasing height.NULL means use default depending on cost.

GW

Logical, initial GW step or not. NULL means use default depending on cost.

...

Not used.

Details

costED uses the Gruvaeus and Wainer 1972 algorithm, as provided by package gclus.

Value

Numeric vector giving an optimal dendrogram order

Author(s)

Catherine Hurley & Denise Earle

References

Gruvaeus, G. \& Wainer, H. (1972), “Two additions to hierarchical cluster analysis”, British Journal of Mathematical and Statistical Psychology, 25, 200-206.

See Also

Examples

require(DendSer) 			

d<- dist(iris[,-5])
h <- hclust(d,method="average")
ob<- DendSer(h,d)
opl<- DendSer(h,d,cost=costPL)
plotAsColor(d,ob)

w <- rowSums(iris[,-5])
ow <- DendSer(h,w,cost=costLS) # arranges cases by size, within hclust
stars(iris[ow,-5],labels=NULL, col.stars=cutree(h,3)[ow]) # and color by cluster
#stars(iris[ow,-5],labels=NULL, col.stars=iris[ow,5]) # or by species

DendSer

Dendrogram seriation: ordering for visualisation

v1.0.1
GPL-2
Authors
Catherine B. Hurley and Denise Earle
Initial release
2013-09-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.