Computes the mean excess values for a vector of observations. These mean excess values can then be plotted as a function of the data or as a function of the tail parameter k.
MeanExcess(data, plot =TRUE, k =FALSE, main ="Mean excess plot",...)
Arguments
data: Vector of n observations.
plot: Logical indicating if the mean excess values should be plotted in a mean excess plot, default is TRUE.
k: Logical indicating if the mean excess scores are plotted as a function of the tail parameter k (k=TRUE) or as a function of the data (k=FALSE). Default is FALSE.
main: Title for the plot, default is "Mean excess plot".
...: Additional arguments for the plot function, see plot for more details.
Details
The mean excess plot is
(k,ek,n)
or
(Xn−k,n,ek,n)
with
ek,n=1/kj=1∑kXn−j+1,n−Xn−k,n.
Note that the mean excess plot is the derivative plot of the Exponential QQ-plot.
See Section 4.1 of Albrecher et al. (2017) for more details.
Returns
A list with following components: - k: Vector of the values of the tail parameter k.
X: Vector of the order statistics data[n-k] corresponding to the tail parameters in k.
e: Vector of the mean excess values corresponding to the tail parameters in k.
References
Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.
Beirlant J., Goegebeur Y., Segers, J. and Teugels, J. (2004). Statistics of Extremes: Theory and Applications, Wiley Series in Probability, Wiley, Chichester.
Author(s)
Tom Reynkens based on S-Plus code from Yuri Goegebeur.
data(norwegianfire)# Mean excess plots for Norwegian Fire Insurance data for claims in 1976.# Mean excess values as a function of kMeanExcess(norwegianfire$size[norwegianfire$year==76], k=TRUE)# Mean excess values as a function of the dataMeanExcess(norwegianfire$size[norwegianfire$year==76], k=FALSE)