searchMaxLambda: Searching For A Maximal Lambda

View source: R/searchMaxLambda.R

searchMaxLambdaR Documentation

Searching For A Maximal Lambda

Description

Function which gives a rough approximation of maximal λ.

Usage

searchMaxLambda(x, limcount = 4, step = 1.05, trylambda = 0.01)

Arguments

x

data in form of a vector

limcount

divided by the square root of the number of data points. The result determines the cut off value.

step

determines step size

trylambda

initial λ

Details

Excess mass is calculated for trylambda. In case the resulting excess mass is larger (smaller) than the cut off value, trylambda is set as trylambda * step (respectively trylambda / step) and excess mass is calculated again until it is smaller (larger) than the cut off value. The corresponding trylambda is returned.

The approximation is done allowing only for one λ-cluster, as scans including more λ-clusters have high computational costs due to the recursive structure of the algorithm.

Value

trylambda calculated as described in Details.

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

Examples

library(MASS)
attach(geyser)

#Calculating Lambda using standard settings
searchMaxLambda(duration)

#Calculating Lambda, reducing cut off value and step. Setting another initial lambda
searchMaxLambda(duration, limcount = 5, step = 1.01, trylambda = 1)

ExcessMass documentation built on June 14, 2022, 1:06 a.m.