Learn R Programming

evmix (version 1.0)

ldwm: Log-likelihood of dynamically weighted mixture model

Description

Log-likelihood and negative log-likelihood for the dynamically weighted mixture model

Usage

ldwm(x, wshape = 1, wscale = 1, cmu = 1, ctau = 1,
    sigmau = sqrt(wscale^2 * gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
    xi = 0, log = TRUE)

  nldwm(pvector, x, finitelik = FALSE)

Arguments

x
vector of sample data
pvector
vector of initial values of mixture model parameters (wshape, wscale, cmu, ctau, sigmau, xi) or NULL
finitelik
logical, should log-likelihood return finite value for invalid parameters
wshape
Weibull shape (non-negative)
wscale
Weibull scale (non-negative)
cmu
Cauchy location
ctau
Cauchy scale
sigmau
scale parameter (non-negative)
xi
shape parameter
log
logical, if TRUE then log density

Value

  • ldwm gives (log-)likelihood and nldwm gives the negative log-likelihood.

Details

The likelihood functions for the dynamically weighted mixture model fdwm. Non-positive data are ignored. They are designed to be used for MLE in fdwm but are available for wider usage, e.g. constructing your own extreme value mixture models. See fdwm and fgpd for full details. Log-likelihood calculations are carried out in ldwm, which takes parameters as inputs in the same form as distribution functions. The negative log-likelihood is a wrapper for ldwm, designed towards making it useable for optimisation (e.g. parameters are given a vector as first input). The function ldwm 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/Weibull_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 Frigessi, A., O. Haug, and H. Rue (2002). A dynamic mixture model for unsupervised tail estimation without threshold selection. Extremes 5 (3), 219-235

See Also

lgpd and gpd Other dwm: fdwm