spd-methods function

spd-methods function

The package implements fit, distribution, density, quantile and random number generation. To calculate expectations from the estimated object we can use quadrature integration, as shown below, with calculations for the mean, variance, skewness, kurtosis, value at risk (1%) and expected shortfall (1%). Virtual Class for holding the tail fit and kernel interior objects. Control parameters and plot parameters optionally passed to the optimization and/or plot function. The density is computed using the generalized pareto distribution in the tails, while for the middle, the density is computed by using a smooth gradient approach.

The Semi-Parametric Distribution is a piecewise distribution constructed by the related reference parametrically modelling the tails of the distribution using an appropriate distribution (e.g. generalized pareto) and the interior by kernel methods. There are a total of 4 parameters, 2 for each tail, estimated independently. This distribution estimates the tails of the data using the Generalized Pareto distribution (gpd) whilst the interior is estimated using a kernel density.

Methods for density dspd, distribution pspd, quantile qspd and random number generation rspd exist and take 2 main arguments, the input value and the fitted object. The main functionality of the package is contained in the SPD class, created by calling spdfit. [all] – the object of class SPDFIT created by calling the spdfit function. [rspd] – the number of random deviates to be generated from fitted distribution. The spd package uses the “bkde” function from the package KernSmooth for the kernel interior fit, while for the tail fit borrows from the fExtremes package and implements a locally modified copy of the gpd functionality and methods. Currently, only the generalized pareto distribution is implemented for modelling the tails, but the package can easily be extended.

Scroll to Top