MRL.plot {envoutliers}  R Documentation 
An empirical mean residual life plot (Coles, 2001), including confidence intervals, is produced based on maximum likelihood or moment estimates.
MRL.plot(x, umin = quantile(na.omit(x), probs = 0.8), umax = quantile(na.omit(x), probs = 0.95), kmin = round(length(na.omit(x)) * 0.05), kmax = round(length(na.omit(x)) * 0.2), nint = 100, conf = 0.95, est.method = "mle", u0 = NULL, k0 = NULL)
x 
data values. Supported data types

umin 
the minimum threshold at which the mean residual life function is calculated based on maximum likelihood estimates. Default is 
umax 
the maximum threshold at which the mean residual life function is calculated based on maximum likelihood estimates. Default is 
kmin 
the minimum number of largest order statistics for which the mean residual life function is calculated based on moment estimates. Default is 
kmax 
the maximum number of largest order statistics for which the mean residual life function is calculated based on moment estimates. Default is 
nint 
the number of points at which the mean residual life function is calculated. Default is 
conf 
the confidence coefficient for the confidence intervals depicted in the plot. Default is 
est.method 
a character string specifying the type of estimates for the scale and shape parameters of GP distribution. Possible options are

u0 
a numeric value giving the threshold meant for a GP approximation of the threshold exceedances. Default is 
k0 
a numeric value giving the number 
The function constructs MRL plot (Coles, 2001) based on maximum likelihood or moment estimates for parameters of GP distribution.
The MRL, i.e. the estimates of the mean excess, are expected to change linearly with threshold levels at which the GP model is appropriate.
If u0
(or k0
, respectively) is given, a GP meanthreshold dependency line is plotted in addition to the MRL plot (Coles, 2001; Eq. 4.9).
Each of the lines provide the user an option to assess the suitability of u0
or k0
as a lower bound for the threshold exceedances (for u0
) or the number of upper order statistics (for k0
) to fit the GP distribution.
In case est.method = "mle"
and u0
takes a value, the theoretical GP mean is estimated by the MLE estimates of the GP parameters. For the case est.method = "moment"
and k0
is given, the theoretical GP mean is estimated using the moment estimates.
In case est.method = "moment"
the value x(nk)
on the xaxis of MRL plot denotes the (k + 1)
th largest observation of the total number of n
observations.
Theo Gasser, Alois Kneip & Walter Koehler (1991) A flexible and fast method for automatic smoothing. Journal of the American Statistical Association 86, 643652. https://doi.org/10.2307/2290393
E. Herrmann (1997) Local bandwidth choice in kernel regression estimation. Journal of Graphical and Computational Statistics 6, 3554.
Herrmann E, Maechler M (2013). lokern: Kernel Regression Smoothing with Local or Global Plugin Bandwidth. R package version 1.15, URL http://CRAN.Rproject.org/package=lokern.
Gasser, T, Muller, HG, Mammitzsch, V (1985). Kernels for nonparametric curve estimation. Journal of the Royal Statistical Society, B Met., 47(2), 238252.
Coles, S (2001). An Introduction to Statistical Modeling of Extreme Values. SpringerVerlag, London, U.K., 208pp.
de Haan, L, Ferreira, A (2006). Extreme Value Theory: An Introduction. Springer.
data("mydata", package = "openair") x = mydata$o3[format(mydata$date, "%m %Y") == "12 2002"] res = smoothing(y = x)$residuals MRL.plot(res)