Learn R Programming

clustrd (version 0.1.2)

FactorialKM: FactorialKM

Description

Implements Factorial k-means (Vichi and Kiers, 2001) which combines Principal Component Analysis for dimension reduction with k-means for clustering.

Usage

FactorialKM(data, nclus, ndim, nstart = 100, smartStart = FALSE)

Arguments

data
quantitative dataset
nclus
number of clusters
ndim
dimensionality of the solution
nstart
number of starts
smartStart
If TRUE then starting values are obtained with k-means

Value

obscoord
object scores
attcoord
attribute scores
centroid
cluster centroids
cluID
cluster membership
criterion
optimal value of the objective function

References

Vichi, M. and Kiers, H.A.L. (2001). Factorial k-means analysis for two-way data. Computational Statistics and Data Analysis, 37, 49-64.

See Also

ReducedKM

Examples

Run this code
   data(macro)
   macro = data.frame(scale(macro, center = TRUE, scale = TRUE))
   outf <- FactorialKM(macro,3,2,nstart=1,smartStart=TRUE)
   plotrd(outf,what=c("all","none"),obslabel=rownames(macro),density=FALSE)

Run the code above in your browser using DataLab