plot.cluspcamix: Plotting function for 'cluspcamix()' output.

Description Usage Arguments Value References See Also Examples

Description

Plotting function that creates a scatterplot of the objects, a correlation circle of the variables or a biplot of both objects and variables. Optionally, for metric variables, it returns a parallel coordinate plot showing cluster means and for categorical variables, a series of barplots showing the standardized residuals per attribute for each cluster.

Usage

1
2
3
4
## S3 method for class 'cluspcamix'
plot(x, dims = c(1, 2), cludesc = FALSE, 
topstdres = 20, attlabs = NULL, subplot = FALSE, 
what = c(TRUE,TRUE), ...)

Arguments

x

Object returned by cluspcamix()

dims

Numerical vector of length 2 indicating the dimensions to plot on horizontal and vertical axes respectively; default is first dimension horizontal and second dimension vertical

what

Vector of two logical values specifying the contents of the plots. First entry indicates whether a scatterplot of the objects and cluster centroids is displayed and the second entry whether a correlation circle of the variables is displayed. The default is c(TRUE, TRUE) and the resultant plot is a biplot of both objects and variables

cludesc

A logical value indicating if a parallel coordinate plot showing cluster means is produced (default = FALSE)

topstdres

Number of largest standardized residuals used to describe each cluster (default = 20). Works only in combination with cludesc = TRUE

subplot

A logical value indicating whether a subplot with the full distribution of the standardized residuals will appear at the bottom left corner of the corresponding plots. Works only in combination with cludesc = TRUE

attlabs

Vector of custom attribute labels; if not provided, default labeling is applied

...

Further arguments to be transferred to cluspcamix()

Value

The function returns a ggplot2 scatterplot of the solution obtained via cluspcamix() that can be further customized using the ggplot2 package. When cludesc = TRUE, for metric variables, the function also returns a ggplot2 parallel coordinate plot and for categorical variables, a series of ggplot2 barplots showing the largest (or all) standardized residuals per attribute for each cluster.

References

van de Velden, M., Iodice D'Enza, A., & Markos, A. (2019). Distance-based clustering of mixed data. Wiley Interdisciplinary Reviews: Computational Statistics, e1456.

Vichi, M., Vicari, D., & Kiers, H. A. L. (2019). Clustering and dimension reduction for mixed variables. Behaviormetrika. doi:10.1007/s41237-018-0068-6.

See Also

plot.clusmca, plot.cluspca

Examples

1
2
3
4
5
6
data(diamond)
#Mixed Reduced K-means solution with 3 clusters in 2 dimensions 
#after 10 random starts
outmixedRKM = cluspcamix(diamond, 3, 2, method = "mixedRKM", nstart = 10)
#Scatterplot (dimensions 1 and 2)
plot(outmixedRKM, cludesc = TRUE)

clustrd documentation built on May 8, 2019, 5:03 p.m.