Learn R Programming

evmix (version 1.0)

lgng: Log-likelihood of Normal Bulk with GPD Upper and Lower Tails Extreme Value Mixture Model

Description

Log-likelihood and negative log-likelihood for the extreme value mixture model with normal for bulk distribution between the lower and upper thresholds with conditional GPD for the two tails.

Usage

lgng(x, nmean = 0, nsd = 1, ul = qnorm(0.1, nmean, nsd),
    sigmaul = nsd, xil = 0, phiul = TRUE,
    ur = qnorm(0.9, nmean, nsd), sigmaur = nsd, xir = 0,
    phiur = TRUE, log = TRUE)

  nlgng(pvector, x, phiul = TRUE, phiur = TRUE,
    finitelik = FALSE)

Arguments

phiul
probability of being above threshold (0, 1) or logical
phiur
probability of being above threshold (0, 1) or logical
x
vector of sample data
pvector
vector of initial values of mixture model parameters or NULL
finitelik
logical, should log-likelihood return finite value for invalid parameters
nmean
normal mean
nsd
normal standard deviation (non-negative)
ul
lower tail threshold
sigmaul
lower tail GPD scale parameter (non-negative)
xil
lower tail GPD shape parameter
ur
upper tail threshold
sigmaur
upper tail GPD scale parameter (non-negative)
xir
upper tail GPD shape parameter
log
logical, if TRUE then log density

Value

  • lgng gives (log-)likelihood and nlgng gives the negative log-likelihood.

Details

The likelihood functions for the extreme value mixture model with normal bulk and GPD for the two tails, as used in the maximum likelihood fitting function fgng. They are designed to be used for MLE in fgng but are available for wider usage, e.g. constructing your own extreme value mixture models. See fgng, gng and fgpd for full details. Log-likelihood calculations are carried out in lgng, which takes parameters as inputs in the same form as distribution functions. The negative log-likelihood is a wrapper for lgng, designed towards making it useable for optimisation (e.g. parameters are given a vector as first input). The tail fractions phiul and phiur are treated separately to the other parameters, to allow for all it's representations. Unlike the distribution functions gng the phiu must be either logical (TRUE or FALSE) or numerical in range $(0, 1)$. The default is to specify phiu=TRUE so that the tail fraction is specified by normal distribution $\phi_u = 1 - H(u)$, or phiu=FALSE to treat the tail fraction as an extra parameter estimated using the sample proportion. Specify a numeric phiu as pre-specified probability $(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. The function lgng carries out the calculations for the log-likelihood directly, which can be exponentiated to give actual likelihood using (log=FALSE).

References

http://en.wikipedia.org/wiki/Normal_distribution http://en.wikipedia.org/wiki/Generalized_Pareto_distribution 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 Zhao, X., Scarrott, C.J. Reale, M. and Oxley, L. (2010). Extreme value modelling for forecasting the market crisis. Applied Financial Econometrics 20(1), 63-72.

See Also

lnormgpd, lgpd and gpd Other gng: dgng, fgng, gng, pgng, qgng, rgng