sjc.kgap: Compute gap statistics for k-means-cluster
Description
An implementation of the gap statistic algorithm from Tibshirani, Walther, and Hastie's
"Estimating the number of clusters in a data set via the gap statistic".
This function calls the clusGap function of the
http://cran.r-project.org/web/packages/cluster/index.html{cluster-package}
to calculate the data for the plot.
Usage
sjc.kgap(x, max = 10, B = 100, SE.factor = 1, method = "Tibs2001SEmax",
plotResults = TRUE)
Arguments
Value
An object containing the used data frame for plotting, the ggplot object
and the number of found cluster.
References
Tibshirani R, Walther G, Hastie T (2001) Estimating the number of clusters in a data set via gap statistic. J. R. Statist. Soc. B, 63, Part 2, pp. 411-423
Maechler, M., Rousseeuw, P., Struyf, A., Hubert, M., Hornik, K.(2013). cluster: Cluster Analysis Basics and Extensions. R package version 1.14.4. (http://cran.r-project.org/web/packages/cluster/index.html{web})