Learn R Programming

ExcessMass (version 1.0.1)

searchMaxLambda: Searching For A Maximal Lambda

Description

Function which gives a rough approximation of maximal \(\lambda\).

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 \(\lambda\)

Value

\(trylambda\) calculated as described in Details.

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 \(\lambda\)-cluster, as scans including more \(\lambda\)-clusters have high computational costs due to the recursive structure of the algorithm.

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab