Learn R Programming

tclust (version 2.2-3)

plot.tclustICsol: Plot Method for tclustICsol Objects

Description

Displays one of the solutions, selected by the argument 'sol'. The default display is a scatterplot matrix of the data using colors and symbols of the observations to identify the groups in the selected solution. If the argument 'choice' is specified and its length is two, a simple scatterplot will be shown. The function fails, if store.x = FALSE is specified in the tclustICsol() call because the original data matrix is required here.

Usage

# S3 method for tclustICsol
plot(x, whichIC, sol = 1, col, pch, main, sub1, choice, ...)

Arguments

x

The tclustICsol object to be displayed

whichIC

A character value which specifies which information criteria to use. Fpr the possible values for whichIC see the help of tclustIC.

sol

Which solution to display - a number between 1 and the nsol argument of tclustICsol.

col

optional colors to identify the groups. If not specified default values will be selected.

pch

optional symbols to identify the groups. If not specified default values will be selected.

main

optional title. The default title shows the information criteria, the solution number, number of groups and restriction factor c used and indication wheather the solution is true or spurios.

sub1

an optional subtitle. The default subtitle shows the type of the displaued solution: 'Best in' and 'Stable in'.

choice

a numeric vector of length between 2 and the number of variables in the input data matrix. If missing, a scatterplot matrix with all variables will be shown. If two variables are selected, a simple scatterplot of the two selected variables is shown.

...

Further (optional) graphical arguments

Details

The plot method for class tclustICsol.

Examples

Run this code

 #--- EXAMPLE 1 ------------------------------------------
 # \donttest{
 data(geyser2)
 (out <- tclustIC(geyser2, whichIC="MIXMIX", alpha=0.1))

 ##  Show the first two best solutions using as Information criterion MIXMIX
 cat("\nBest solutions using MIXMIX\n")
 outsol <- tclust::tclustICsol(out, whichIC="MIXMIX", nsol=2)
 plot(outsol)
 plot(outsol, choice=c(1,2))
 plot(outsol, choice=c(1,2), xlab="XLAB", ylab="YLAB")
 # }

Run the code above in your browser using DataLab