cdensity: Kernel Smoothed Scedasis Density

View source: R/cdensity.R

cdensityR Documentation

Kernel Smoothed Scedasis Density

Description

This function computes a kernel scedasis density estimate.

Usage

cdensity(Y, threshold = quantile(Y[, 2], 0.95), ...)

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.

threshold

value used to threshold the data y; by default threshold = quantile(y, 0.95).

...

further arguments for density methods.

Details

Kernel smoothing for the scedasis density was introduced by Einmahl et al (2016).

Value

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.

Author(s)

Miguel de Carvalho

References

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.

Examples

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)

extremis documentation built on Dec. 9, 2022, 5:08 p.m.

Related to cdensity in extremis...