cmodes {extremis} | R Documentation |
Mode Mass Function
Description
This function computes the mode mass function.
Usage
cmodes(Y, thresholds = apply(Y[, -1], 2, quantile, probs =
0.95), nu = 100, ...)
Arguments
Y |
data frame from which the estimate is to be computed; first column corresponds to time and the second to the variable of interest. |
thresholds |
values used to threshold the data |
nu |
concentration parameter of beta kernel used to smooth mode mass function. |
... |
further arguments for |
Details
The scedasis functions on which the mode mass function is based are
computed using the default "nrd0"
option for bandwidth.
Value
c |
scedasis density estimators. |
k |
number of exceedances above the threshold. |
w |
standardized indices of exceedances. |
Y |
raw data. |
The plot
method depicts the smooth mode mass function along
with the smooth scedasis densities.
Author(s)
Miguel de Carvalho
References
Rubio, R., de Carvalho, M., and Huser, R. (2018) Similarity-Based Clustering of Extreme Losses from the London Stock Exchange. Submitted.
Examples
data(lse)
attach(lse)
nlr <- -apply(log(lse[, -1]), 2, diff)
Y <- data.frame(DATE[-1], nlr)
T <- dim(Y)[1]
k <- floor((0.4258597) * T / (log(T)))
fit <- cmodes(Y, thresholds = as.numeric(apply(nlr, 2, sort)[T - k, ]),
kernel = "biweight", bw = 0.1 / sqrt(7), nu = 100)
plot(fit)