MLE Fitting of Kernel Density Estimate for Bulk and GPD for Both Tails Extreme Value Mixture Model
MLE Fitting of Kernel Density Estimate for Bulk and GPD for Both Tails Extreme Value Mixture Model
Maximum likelihood estimation for fitting the extreme value mixture model with kernel density estimate for bulk distribution between thresholds and conditional GPDs beyond thresholds. With options for profile likelihood estimation for both thresholds and fixed threshold approach.
phiul: probability of being below lower threshold (0,1) or logical, see Details in help for fgng
phiur: probability of being above upper threshold (0,1) or logical, see Details in help for fgng
ulseq: vector of lower thresholds (or scalar) to be considered in profile likelihood or NULL for no profile likelihood
urseq: vector of upper thresholds (or scalar) to be considered in profile likelihood or NULL for no profile likelihood
fixedu: logical, should threshold be fixed (at either scalar value in ulseq/urseq, or estimated from maximum of profile likelihood evaluated at sequence of thresholds in ulseq/urseq)
pvector: vector of initial values of parameters or NULL for default values, see below
kernel: kernel name (default = "gaussian")
add.jitter: logical, whether jitter is needed for rounded kernel centres
factor: see jitter
amount: see jitter
std.err: logical, should standard errors be calculated
method: optimisation method (see optim)
control: optimisation control list (see optim)
finitelik: logical, should log-likelihood return finite value for invalid parameters
...: optional inputs passed to optim
lambda: scalar bandwidth for kernel (as half-width of kernel)
bw: scalar bandwidth for kernel (as standard deviations of kernel)
log: logical, if TRUE then log-likelihood rather than likelihood is output
ulr: vector of length 2 giving lower and upper tail thresholds or NULL for default values
Returns
Log-likelihood is given by lgkg and it's wrappers for negative log-likelihood from nlgkg
and nlugkg. Profile likelihood for both thresholds given by proflugkg. Fitting function fgkg returns a simple list with the following elements
call :
optim call
x :
data vector x
init :
pvector
fixedu :
fixed thresholds, logical
ulseq :
lower threshold vector for profile likelihood or scalar for fixed threshold
urseq :
upper threshold vector for profile likelihood or scalar for fixed threshold
nllhuseq :
profile negative log-likelihood at each threshold pair in (ulseq, urseq)
optim :
complete optim output
mle :
vector of MLE of parameters
cov :
variance-covariance matrix of MLE of parameters
se :
vector of standard errors of MLE of parameters
rate :
phiu to be consistent with evd
nllh :
minimum negative log-likelihood
n :
total sample size
lambda :
MLE of lambda (kernel half-width)
ul :
lower threshold (fixed or MLE)
sigmaul :
MLE of lower tail GPD scale
xil :
MLE of lower tail GPD shape
phiul :
MLE of lower tail fraction (bulk model or parameterised approach)
se.phiul :
standard error of MLE of lower tail fraction
ur :
upper threshold (fixed or MLE)
sigmaur :
MLE of upper tail GPD scale
xir :
MLE of upper tail GPD shape
phiur :
MLE of upper tail fraction (bulk model or parameterised approach)
se.phiur :
standard error of MLE of upper tail fraction
bw :
MLE of bw (kernel standard deviations)
kernel :
kernel name
Details
The extreme value mixture model with kernel density estimate for bulk and GPD for both tails is fitted to the entire dataset using maximum likelihood estimation. The estimated parameters, variance-covariance matrix and their standard errors are automatically output.
See help for fnormgpd and fgkg
for details, type help fnormgpd and help fgkg. Only the different features are outlined below for brevity.
The full parameter vector is (lambda, ul, sigmaul, xil, ur, sigmaur, xir) if thresholds are also estimated and (lambda, sigmaul, xil, sigmaur, xir) for profile likelihood or fixed threshold approach.
Cross-validation likelihood is used for KDE, but standard likelihood is used for GPD components. See help for fkden for details, type help fkden.
The alternate bandwidth definitions are discussed in the kernels, with the lambda as the default used in the likelihood fitting. The bw specification is the same as used in the density function.
The possible kernels are also defined in kernels
with the "gaussian" as the default choice.
The tail fractions phiul and phiur are treated separately to the other parameters, to allow for all their representations. In the fitting functions fgkg and proflugkg they are logical:
default values phiul=TRUE and phiur=TRUE - tail fractions specified by KDE distribution and survivior functions respectively and standard error is output as NA.
phiul=FALSE and phiur=FALSE - treated as extra parameters estimated using the MLE which is the sample proportion beyond the thresholds and standard error is output.
In the likelihood functions lgkg, nlgkg and nlugkg
it can be logical or numeric:
logical - same as for fitting functions with default values phiul=TRUE and phiur=TRUE.
numeric - any value over range (0,1). Notice that the tail fraction probability cannot be 0 or 1 otherwise there would be no contribution from either tail or bulk components respectively. Also, phiul+phiur\<1 as bulk must contribute.
If the profile likelihood approach is used, then a grid search over all combinations of both thresholds
is carried out. The combinations which lead to less than 5 in any datapoints beyond the thresholds are not considered.
Note
The data and kernel centres are both vectors. Infinite and missing sample values (and kernel centres) are dropped.
When pvector=NULL then the initial values are:
normal reference rule for bandwidth, using the bw.nrd0 function, which is consistent with the density function. At least two kernel centres must be provided as the variance needs to be estimated.
lower threshold 10% quantile (not relevant for profile likelihood for threshold or fixed threshold approaches);
upper threshold 90% quantile (not relevant for profile likelihood for threshold or fixed threshold approaches);
MLE of GPD parameters beyond thresholds.
Warning
See important warnings about cross-validation likelihood estimation in fkden, type help fkden.
Acknowledgments
See Acknowledgments in fnormgpd, type help fnormgpd. Based on code by Anna MacDonald produced for MATLAB.
Scarrott, C.J. and MacDonald, A. (2012). A review of extreme value threshold estimation and uncertainty quantification. REVSTAT - Statistical Journal 10(1), 33-59. Available from http://www.ine.pt/revstat/pdf/rs120102.pdf
Bowman, A.W. (1984). An alternative method of cross-validation for the smoothing of density estimates. Biometrika 71(2), 353-360.
Duin, R.P.W. (1976). On the choice of smoothing parameters for Parzen estimators of probability density functions. IEEE Transactions on Computers C25(11), 1175-1179.
MacDonald, A., Scarrott, C.J., Lee, D., Darlow, B., Reale, M. and Russell, G. (2011). A flexible extreme value mixture model. Computational Statistics and Data Analysis 55(6), 2137-2157.
Wand, M. and Jones, M.C. (1995). Kernel Smoothing. Chapman && Hall.