exmplot | R Documentation |
Produces an excess mass lambda plot and calculates the maximal excess mass difference achieved by allowing for an additional mode.
exmplot(xdata, M=1, CutOff=1, steps=50, Lambda=NULL)
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 λs are calculated |
steps |
number of different λs which are calculated / drawn |
Lambda |
allows specifying an own vector of λs |
CutOff should not be set too small or too large, as this results in meaningless graphs. The excess mass for several λs can be calculated by specifying the Lambda.
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 λ at which the maximal excess mass difference is achieved |
Marc-Daniel Mildenberger mildenberger.stat@web.de, based on earlier code from Dr. Guenther Sawitzki gs@statlab.uni-heidelberg.de
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
excessm, exmsilhouette, mexmsilhouette
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.