mexmsilhouette {ExcessMass} | R Documentation |
(Multiple) Excess Mass Silhouette
Description
Produces a graph with several excess mass plots allowing for different maximal numbers of modes/ cut off values.
Usage
mexmsilhouette(xdata, M = 1:3, CutOff = c(1,2,5), steps = 30,
Lambda = NULL, col = FALSE, rug = TRUE, rdata = FALSE)
Arguments
xdata |
data in form of a vector |
M |
vector containing the max. number of modes |
CutOff |
vector which determines the cut off values and hence the appearance of the graph |
steps |
number of different |
Lambda |
allows to specify an own vector of |
col |
lines get colored in purple ( |
rug |
draws a rug plot at the bottom of the graph |
rdata |
a numerical output is returned |
Details
CutOff
should not be set too small or too large, as this results in meaningless graphs.
Value
Always a graph with multiple plots is produced. Each column contains another maximal number of modes and each row another CutOff factor.
Setting rdata=TRUE numerical results are returned in form of a list. If the number of modes and the CutOff parameter contain just one element, the output of "mexmsilhouette" and "exmplot" are equal.
Otherwise we can distinguish between two cases. First Lambda
is not specified, hence the list is four-dimensional. The first element determines the CutOff value of the data by using the sorted CutOff vector (using the plot, this means the row in which the graph is shown). The second element specifies the maximal number of modes by using the sorted mode vector (again using the plot, this means the column of the plot). The third element selects the \lambda
of the graph. For each plot and each \lambda
, the following information is stored: the value of \lambda
, the \lambda
-clusters and the excess mass vector. Using the default setting [2,2,5,2]
shows the \lambda
-clusters of the fifth smallest \lambda
of the CutOff=2-M=2
-plot.
If Lambda
is declared manually, the list is three-dimensional. Hence, the first argument denotes the maximal number of modes (the column of the graph). The second argument indicates the \lambda
by the position held by it in the Lambda
vector. As in "exmplot" only two information are shown. The \lambda
-clusters ([,,1]
) and the vector of excess mass ([,,2]
), as the value of \lambda
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, exmplot, exmsilhouette
Examples
library(MASS)
attach(geyser)
##calculating excess mass plots for duration of 'Old Faithful Geyser',
##specifying CutOff and number of steps manually
mexmsilhouette(duration, CutOff=c(1,2), steps=60)
##Allowing for three different maximal number of modes
##and CutOff factors as well as color.
##The rug plot is omitted and numerical data is requested.
res=mexmsilhouette(duration, M=c(2,3,7), CutOff=c(0.8,1,2), col=TRUE, rug=FALSE, rdata=TRUE)
##Lambda is specified, color is set to true, numerical data is requested
L=seq(.01,.25,0.005)
res=mexmsilhouette(duration, M=c(2,3,4), Lambda=L, col=TRUE, rdata=TRUE)