Learn R Programming

tclust (version 1.0-2)

plot.bayesfact: Plot Method for bayesfact Objects

Description

Next to a plot of the tclust object which has been used for calculating the bayesfact object, a silhouette plot indicates the amount of doubtfully assigned observations. A third plot similar to the standard tclust plot highlights the identified doubtful observations.

Usage

plot.bayesfact(x, ...)
plot.bayesfact.p2(x, xlab = "Bayes Factor", ylab = "Clusters", main, xlim, print.bayes = TRUE, ...)
plot.bayesfact.p3(x, main = "Doubtful Assignments", ...)

Arguments

x
An object of class "bayesfact" as from bayesfact ().
xlab, ylab, xlim
Arguments passed to funcion plot.tclust.
main
Argument passed to funcion plot.
print.bayes
A logical value indicating whether each clusters mean Bayes factor shall be plotted
...
Further arguments are passed to function plot

Value

  • No return value is provided.

encoding

latin1

Details

plot.bayesfact.p2 displays a silhouette plot based on the Bayes factors of the observations. A solution with many large Bayes factors is not reliable. Such clusters can be identified with this silhouette plot.Thus plot.bayesfact.p3 displays the dataset, highlighting observations with Bayes factors greater than the given threshold. Function plot.bayesfact combines the standard plot of a tclust object, and the two plots introduced here.

References

Garc�a{Garcia}-Escudero, L.A.; Gordaliza, A.; Matr�n{Matran}, C. and Mayo-Iscar, A. (2009), "Exploring the number of groups in robust model-based clustering". Preprint available at www.eio.uva.es/infor/personas/langel.html.

Examples

Run this code
sig <- diag (2)
cen <- rep (1,2)
x <- rbind (
	rmvnorm (360, cen * 0,   sig),
	rmvnorm (540, cen * 5,   sig * 6 - 2),
	rmvnorm (100, cen * 2.5, sig * 50)
)

clus.1 <- tclust (x, k=2, alpha=0.1, restr.fact=12)
clus.2 <- tclust (x, k=3, alpha=0.1, restr.fact=1) # "Improper" choice of parameters

bay.1 <- bayesfact(clus.1)
plot(bay.1)

bay.2 <- bayesfact(clus.2)
plot(bay.2)

dev.off ()
plot.bayesfact.p2(bay.1)
plot.bayesfact.p3(bay.2)

Run the code above in your browser using DataLab