plot.cluster.optimal {bayesclust}R Documentation

Plot the Optimal Clusters Found in Datasets

Description

plot.cluster.optimal allows the user to plot the optimal clusters found by the search algorithm in cluster.optimal.

Usage

## S3 method for class 'cluster.optimal':
plot(x, ...)

Arguments

x x must be an object of class ``cluster.optimal'', which is returned when cluster.optimal is run on a dataset.
... Additional arguments to be passed to the inherited plot

Details

This function will plot the optimal cluster found, using different colors to represent the different clusters. If the experimenter wishes to plot the 2nd best, or 3rd best cluster, he will have to do this manually.

This function only works for the cases when the observations in the data are vectors of length p, where p takes one of the values 2, 3, 4, 5 or 6. In each of these cases pairwise plots will be generated, one for each dataset.

In the event that the experimenter only wishes to plot certain variables against another, he/she will have to do this manually, and may wish to refer to the examples below.

Author(s)

Gopal, V.

References

Fuentes, C. and Casella, G. (2008) "Testing for the Existence of Clusters" http://www.stat.ufl.edu/~casella/Papers/paper-v3.pdf

Gopal, V. "BayesClust User Manual" http://www.stat.ufl.edu/~viknesh/bayesclust/clust.html

See Also

cluster.optimal for further information on objects of class ``cluster.optimal''.

plot for details on arguments that can be passed through ...

Examples

# Generate random 2-variate data
Y <- matrix(rnorm(24), nrow=12)

# Search for optimal partitioning of data into 2 clusters
search1 <- cluster.optimal(Y, p=2, keep=5)

# Plot the best cluster found during search
plot(search1)

[Package bayesclust version 2.1 Index]