exmsilhouette {ExcessMass}R Documentation

(Single) Excess Mass Silhouette

Description

Produces an excess mass plot and the corresponding numerical values if required.

Usage

exmsilhouette(xdata, M = 1, CutOff = 1,steps = 50,rug = TRUE,
Lambda = NULL,col = FALSE,rdata = FALSE,label = TRUE)

Arguments

xdata

data in form of vector

M

the maximal number of modes

CutOff

determines the cut off value and hence the appearance of the graph

steps

number of different \lambdas which are calculated / drawn

rug

draws a rug plot at the bottom of the graph

Lambda

allows to specify an own vector of \lambdas which are drawn in the graph

col

lines get colored in purple (em > 0.75), green (0.75 \ge em > 0.5), turquoise (0.5 \ge em > 0.25), blue (0.25 \ge em > 0.05) and black (0.05 \ge em)

rdata

a numerical output is returned

label

allows to reduce labeling

Details

CutOff should not be set too small or too large, as this results in meaningless graphs. The excess mass for several \lambdas can be calculated by specifying the Lambda.

Value

A plot is always produced. By setting rdata=TRUE numerical results are returned in form of a two-dimensional list. The first argument specifies \lambda. This means that if steps=50 with 1 (50) you get access to the numerical results for the smallest (largest) \lambda.

In case no \lambda-vector is used for each \lambda, the following information is displayed:

[, 1]

value of \lambda,

[, 2]

calculated \lambda-clusters

[, 3]

excess mass vector

The last two components are presented in the way known from the excess mass function. In case Lambda was set manually the value of \lambda is not returned, as it is known.

Author(s)

Marc-Daniel Mildenberger mildenberger.stat@web.de, based on earlier code from Dr. Guenther Sawitzki gs@statlab.uni-heidelberg.de

References

Muller, D. W. and Sawitzki, G., 09.1991, "Excess Mass Estimates and Tests for Multimodality", Journal of the American Statistical Association , Vol. 86, No. 415, pp. 738–746, http://www.jstor.org/stable/2290406

See Also

excessm, mexmsilhouette, exmplot

Examples

library(MASS)
attach(geyser)

##Plot allowing for up to two modes and reduced CutOff value
exmsilhouette(duration, M=2, CutOff=1.25)

##Plot with twice the default number of steps, omitting rug plot, 
##colorizing the graph and asking for numerical output
res <- exmsilhouette(duration, M=2, CutOff=1.25, steps=100, rug=FALSE, col=TRUE, rdata=TRUE)

##Specifying Lambda and requesting numerical output
L=seq(.01,0.25,0.005)
res <- exmsilhouette(duration, M=3, Lambda=L, col=TRUE, rdata=TRUE)

[Package ExcessMass version 1.0.1 Index]