Learn R Programming

ExcessMass (version 1.0.1)

exmplot: Excess Mass Lambda Plot

Description

Produces an excess mass lambda plot and calculates the maximal excess mass difference achieved by allowing for an additional mode.

Usage

exmplot(xdata, M=1, CutOff=1, steps=50, Lambda=NULL)

Arguments

xdata

data in form of a vector

M

the maximal number of modes

CutOff

determines the cut off value and hence the level up to which the \(\lambda\)s are calculated

steps

number of different \(\lambda\)s which are calculated / drawn

Lambda

allows specifying an own vector of \(\lambda\)s

Value

An Excess Mass Lambda plot is produced. The lines in the plot are sorted by the maximal number of modes from left to right, due to the monotonicity of the excess mass in M.

max_dist

The i. entry is the maximal distance of the excess mass by allowing for up to i+1 instead of i modes

max_dist_Lambda

Shows the \(\lambda\) at which the maximal excess mass difference is achieved

Details

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

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, exmsilhouette, mexmsilhouette

Examples

Run this code
# NOT RUN {
library(MASS)
attach(geyser)

##calculating the maximal excess mass difference for duration of 'Old Faithful Geyser' for M=3
exmplot(duration, M=3)

##Plotting the excess mass against lambda for modes 1-5, 
##increase CutOff value, double the number of steps
exmplot(duration, M=5, CutOff=1.2, steps=100)

##Specifying Lambda
Lambda=seq(.0,0.5,0.005)
exmplot(duration, M=7, Lambda=Lambda)
# }

Run the code above in your browser using DataLab