cdensity | R Documentation |
This function computes a kernel scedasis density estimate.
cdensity(Y, threshold = quantile(Y[, 2], 0.95), ...)
Y |
data frame from which the estimate is to be computed; first column corresponds to time and the second to the variable of interest. |
threshold |
value used to threshold the data |
... |
further arguments for |
Kernel smoothing for the scedasis density was introduced by Einmahl et al (2016).
c |
scedasis density estimator. |
k |
number of exceedances above the threshold. |
w |
standardized indices of exceedances. |
Y |
raw data. |
The plot
method depicts the smooth scedasis density.
Miguel de Carvalho
Einmahl, J. H., Haan, L., and Zhou, C. (2016) Statistics of heteroscedastic extremes. Journal of the Royal Statistical Society: Ser. B, 78(1), 31–51.
data(lse) attach(lse) Y <- data.frame(DATE[-1], -diff(log(ROYAL.DUTCH.SHELL.B))) T <- dim(Y)[1] k <- floor((0.4258597) * T / (log(T))) fit <- cdensity(Y, kernel = "biweight", bw = 0.1 / sqrt(7), threshold = sort(Y[, 2])[T - k]) plot(fit) plot(fit, original = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.