# Transformed kernel estimation - R programming

## Ramon Alemany, Catalina Bolancé & Montserrat Guillén

This page presents transformed kernel density estimation using data from the book Quantitative Operational Risk Models.   A methodological overview can be found in:

### DATA DESCRIPTION

 Name Content of operational risk loss data Internal data set 75 observed loss amounts External data set 700 observed loss amounts Public data risk no. 1 1000 observed loss amounts for category no. 1 Public data risk no. 2 400 observed loss amounts for category no. 2

##### VALUE AT RISK WITH KERNEL AND TRANSFORMED KERNEL ESTIMATION

For a random sample of n independent and identically distributed observations x1, x2,..., xn of a random variable X with pdf fX, the value at risk can be calculated using classifcal kernel density estimator and transformed kernel estimation:

- Classical kernel cdf estimation

$$\begin{array}{c} \ \ \ \ \widehat{F}_{X}(x)=\int_{-\infty }^{x} \widehat{f}_{X}(u)du =\int_{-\infty }^{x}\frac{1}{nb}\sum_{i=1}^{n}k\left( \frac{u-X_{i}}{b}\right)du \\ =\frac{1}{n}\sum_{i=1}^{n}\int_{-\infty }^{\frac{x-X_{i}}{b}}k\left( t\right) dt=\frac{1}{n}\sum_{i=1}^{n}K\left( \frac{x-X_{i}}{b} \right). \label{kdist} \end{array}$$
K is the kernel function and b is the bandwidth.
To estimate value at risk, the Newton-Raphson method is applied

- Transformed kernel cdf estimation

$$\widehat{F}_{X}\left( x\right) =\widehat{F}_{T\left( X\right) }(T\left( x\right) )=\frac{1}{n}\sum_{i=1}^{n}K\left( \frac{T\left( x\right) -T\left( X_{i}\right) }{b}\right) \label{tkdist}$$
T(·) is the transformation, K is the kernel function and b is the bandwidth.
To estimate value at risk, the Newton-Raphson method is applied

###### REFERENCES

[1] Bolancé, C. (2010) Optimal Inverse Beta(3,3) Transformation in kernel density estimation, SORT Statistics and Operations Research Transaction, 34, 223-238.

[2] Bolancé, C., Guillén, M., Gustafsson J. and Nielsen, J.P. (2012) Quantitative Operational Risk Models Chapman & Hall/CRC.

[3] Bolancé, C., Guillén, M. and Nielsen, J.P. (2009) Transformation kernel estimation of insurance claim cost distribution, in Corazza, M. and Pizzi, C. (Eds), Mathematical and Statistical Methods for Actuarial Sciences and Finance, Springer, Roma, 223-231.

[4] Bolancé, C., Guillén, M. and Nielsen, J.P. (2008) Inverse Beta transformation in kernel density estimation. Statistics & Probability Letters, 78, 1757-1764.

[5] Bolancé, C., Guillén, M. and Nielsen, J.P. (2003) Kernel density estimation of actuarial loss functions, Insurance: Mathematics and Economics, 32, 19-36.

[6] Bolancé, C., Guillén, M. and Pitt, D. (2014) Non-parametric models for univariate claim severity distributions - an approach using R, UB Riskcenter Working Papers Series 2014-01.

[7] Buch-Larsen, T., Guillen, M., Nielsen, J.P. and Bolancé, C. (2005) Kernel density estimation for heavy-tailed distributions using the Champernowne transformation. Statistics, 39, 503-518.

[8] Clements, A.E., Hurn, A.S. and Lindsay, K.A. (2003) Möebius-like mappings and their use in kernel density estimation, Journal of the American Statistical Association, 98, 993-1000.

• Universitat de Barcelona - Last Updated: 05-23-2014