MLE Fitting of Normal Bulk and GPD Tail Extreme Value Mixture Model with Single Continuity Constraint
MLE Fitting of Normal Bulk and GPD Tail Extreme Value Mixture Model with Single Continuity Constraint
Maximum likelihood estimation for fitting the extreme value mixture model with normal for bulk distribution upto the threshold and conditional GPD above threshold with continuity at threshold. With options for profile likelihood estimation for threshold and fixed threshold approach.
phiu: probability of being above threshold (0,1) or logical, see Details in help for fnormgpd
useq: vector of 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 useq, or estimated from maximum of profile likelihood evaluated at sequence of thresholds in useq)
pvector: vector of initial values of parameters or NULL for default values, see below
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
nmean: scalar normal mean
nsd: scalar normal standard deviation (positive)
u: scalar threshold value
xi: scalar shape parameter
log: logical, if TRUE then log-likelihood rather than likelihood is output
Returns
Log-likelihood is given by lnormgpdcon and it's wrappers for negative log-likelihood from nlnormgpdcon
and nlunormgpdcon. Profile likelihood for single threshold given by proflunormgpdcon. Fitting function fnormgpdcon returns a simple list with the following elements
call :
optim call
x :
data vector x
init :
pvector
fixedu :
fixed threshold, logical
useq :
threshold vector for profile likelihood or scalar for fixed threshold
nllhuseq :
profile negative log-likelihood at each threshold in useq
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
nmean :
MLE of normal mean
nsd :
MLE of normal standard deviation
u :
threshold (fixed or MLE)
sigmau :
MLE of GPD scale (estimated from other parameters)
xi :
MLE of GPD shape
phiu :
MLE of tail fraction (bulk model or parameterised approach)
se.phiu :
standard error of MLE of tail fraction
Details
The extreme value mixture model with normal bulk and GPD tail with continuity at threshold 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 for full details, type help fnormgpd. Only the different features are outlined below for brevity.
The GPD sigmau parameter is now specified as function of other parameters, see help for dnormgpdcon for details, type help normgpdcon. Therefore, sigmau should not be included in the parameter vector if initial values are provided, making the full parameter vector (nmean, nsd, u, xi) if threshold is also estimated and (nmean, nsd, xi) for profile likelihood or fixed threshold approach.
Note
When pvector=NULL then the initial values are:
MLE of normal parameters assuming entire population is normal; and
threshold 90% quantile (not relevant for profile likelihood for threshold or fixed threshold approaches);
MLE of GPD shape parameter above threshold.
Acknowledgments
See Acknowledgments in fnormgpd, type help fnormgpd.
Examples
## Not run:set.seed(1)par(mfrow = c(2,1))x = rnorm(1000)xx = seq(-4,4,0.01)y = dnorm(xx)# Continuity constraintfit = fnormgpdcon(x)hist(x, breaks =100, freq =FALSE, xlim = c(-4,4))lines(xx, y)with(fit, lines(xx, dnormgpdcon(xx, nmean, nsd, u, xi), col="red"))abline(v = fit$u, col ="red")# No continuity constraintfit2 = fnormgpd(x)with(fit2, lines(xx, dnormgpd(xx, nmean, nsd, u, sigmau, xi), col="blue"))abline(v = fit2$u, col ="blue")legend("topleft", c("True Density","No continuity constraint","With continuty constraint"), col=c("black","blue","red"), lty =1)# Profile likelihood for initial value of threshold and fixed threshold approachfitu = fnormgpdcon(x, useq = seq(0,3, length =20))fitfix = fnormgpdcon(x, useq = seq(0,3, length =20), fixedu =TRUE)hist(x, breaks =100, freq =FALSE, xlim = c(-4,4))lines(xx, y)with(fit, lines(xx, dnormgpdcon(xx, nmean, nsd, u, xi), col="red"))abline(v = fit$u, col ="red")with(fitu, lines(xx, dnormgpdcon(xx, nmean, nsd, u, xi), col="purple"))abline(v = fitu$u, col ="purple")with(fitfix, lines(xx, dnormgpdcon(xx, nmean, nsd, u, xi), col="darkgreen"))abline(v = fitfix$u, col ="darkgreen")legend("topleft", c("True Density","Default initial value (90% quantile)","Prof. lik. for initial value","Prof. lik. for fixed threshold"), col=c("black","red","purple","darkgreen"), lty =1)## End(Not run)
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
Behrens, C.N., Lopes, H.F. and Gamerman, D. (2004). Bayesian analysis of extreme events with threshold estimation. Statistical Modelling. 4(3), 227-244.