excessm {ExcessMass}R Documentation

Excess Mass Function

Description

Algorithm which calculates the empirical excess mass for a given λ\lambda and given maximal number of modes.

Usage

excessm(x, lambda, M = 1, UpToM = FALSE)

Arguments

x

data in form of a vector

lambda

λ\lambda of interest

M

maximal number of modes

UpToM

if true, the intervals for modes up to M are returned

Value

intervals

Matrix containing the empirical λ\lambda-clusters. Line ii consists of information about the i.λi.-\lambda-cluster, where iMi \le M. First (Second) column contains the corresponding starting (ending) sorted observation index. Third (Fourth) column the starting (ending) value. In case UpToMUpToM is true and M>1M>1, a list is returned with the intervals for all modes M\le M

excess_mass

returns a vector with excess masses, the i.i. entry is the excess mass achieved with ii modes

Note

Please note that an allowance for MM modes does not necessarily result in MM λ\lambda-clusters. Hence, the number of intervals returned can be smaller than MM. In this case a warning will be displayed. The vector excessmassexcess_mass does have less than MM entries.

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

exmplot, exmsilhouette, mexmsilhouette

Examples

library(MASS)
attach(geyser)

##calculating excess mass for duration of 'Old Faithful Geyser' for lambda=0.2 allowing for one mode
excessm(duration, lambda=0.2)

##same as above, but allowing for up to three modes
excessm(duration, lambda=0.2, M=3) 

#returns the intervals for modes 1,2 and 3
excessm(duration, lambda=0.2, M=3, UpToM=TRUE) 

[Package ExcessMass version 1.0.1 Index]