View source: R/searchMaxLambda.R
searchMaxLambda | R Documentation |
Function which gives a rough approximation of maximal λ.
searchMaxLambda(x, limcount = 4, step = 1.05, trylambda = 0.01)
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 λ |
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.
trylambda calculated as described in Details.
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, exmplot, exmsilhouette, mexmsilhouette
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.