pamward: PAM from k-solution of hierarchical clustering

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Runs a pam clustering (pam) from the solution in k groups of a hierarchical clustering (agnes) .

Usage

1
pamward(dist, k=3, method="ward")

Arguments

dist

A distance matrix or object.

k

Number of clusters.

method

Method for the hierarchical clustering (see agnes)

Details

The function first runs the hierarchical clustering, retrieves the medoids of the solution for the provided k and uses those medoids as start centers for the pam partitioning.

Value

An object of class "pam". See pam.object for details.

Author(s)

Gilbert Ritschard

See Also

agnes and pam.

Examples

1
2
3
4
5
6
library(cluster)
data(actcal)
actcal.seq <- seqdef(actcal[1:200,13:24])
actcal.ham <- seqdist(actcal.seq, method = "HAM")
clust <- pamward(actcal.ham, k = 4)
table(clust$clustering)

TraMineRextras documentation built on April 15, 2017, 10:55 a.m.

Search within the TraMineRextras package
Search all R packages, documentation and source code