Produces a graph with several excess mass plots allowing for different maximal numbers of modes/ cut off values.
mexmsilhouette(xdata, M = 1:3, CutOff = c(1,2,5), steps = 30,
Lambda = NULL, col = FALSE, rug = TRUE, rdata = FALSE)
data in form of a vector
vector containing the max. number of modes
vector which determines the cut off values and hence the appearance of the graph
number of different
allows to specify an own vector of
lines get colored in purple (
draws a rug plot at the bottom of the graph
a numerical output is returned
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
If
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
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab