fitmweibullgpd {evmix}R Documentation

MLE Fitting of Weibull Bulk and GPD Tail Interval Transition Mixture Model

Description

Maximum likelihood estimation for fitting the extreme valeu mixture model with the Weibull bulk and GPD tail interval transition mixture model. With options for profile likelihood estimation for threshold and interval half-width, which can both be fixed.

Usage

fitmweibullgpd(x, eseq = NULL, useq = NULL, fixedeu = FALSE,
  pvector = NULL, std.err = TRUE, method = "BFGS",
  control = list(maxit = 10000), finitelik = TRUE, ...)

litmweibullgpd(x, wshape = 1, wscale = 1, epsilon = sqrt(wscale^2 *
  gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
  u = qweibull(0.9, wshape, wscale), sigmau = sqrt(wscale^2 * gamma(1 +
  2/wshape) - (wscale * gamma(1 + 1/wshape))^2), xi = 0, log = TRUE)

nlitmweibullgpd(pvector, x, finitelik = FALSE)

profleuitmweibullgpd(eu, pvector, x, method = "BFGS",
  control = list(maxit = 10000), finitelik = TRUE, ...)

nleuitmweibullgpd(pvector, epsilon, u, x, finitelik = FALSE)

Arguments

x

vector of sample data

eseq

vector of epsilons (or scalar) to be considered in profile likelihood or NULL for no profile likelihood

useq

vector of thresholds (or scalar) to be considered in profile likelihood or NULL for no profile likelihood

fixedeu

logical, should threshold and epsilon be fixed (at either scalar value in useq and eseq, or estimated from maximum of profile likelihood evaluated at grid of thresholds and epsilons in useq and eseq)

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

wshape

scalar Weibull shape (positive)

wscale

scalar Weibull scale (positive)

epsilon

interval half-width

u

scalar threshold value

sigmau

scalar scale parameter (positive)

xi

scalar shape parameter

log

logical, if TRUE then log-likelihood rather than likelihood is output

eu

vector of epsilon and threshold pair considered in profile likelihood

Details

The extreme value mixture model with the Weibull bulk and GPD tail with interval transition is fitted to the entire dataset using maximum likelihood estimation. The estimated parameters, variance-covariance matrix and their standard errors are automatically output.

See ditmweibullgpd for explanation of Weibull-GPD interval transition model, including mixing functions.

See also help for fnormgpd for mixture model fitting details. Only the different features are outlined below for brevity.

The full parameter vector is (wshape, wscale, epsilon, u, sigmau, xi) if threshold and interval half-width are both estimated and (wshape, wscale, sigmau, xi) for profile likelihood or fixed threshold and epsilon approach.

If the profile likelihood approach is used, then it is applied to both the threshold and epsilon parameters together. A grid search over all combinations of epsilons and thresholds are considered. The combinations which lead to less than 5 on either side of the interval are not considered.

A fixed threshold and epsilon approach is acheived by setting a single scalar value to each in useq and eseq respectively.

If the profile likelihood approach is used, then a grid search over all combinations of epsilon and threshold are carried out. The combinations which lead to less than 5 in any any interval are not considered.

Negative data are ignored.

Value

Log-likelihood is given by litmweibullgpd and it's wrappers for negative log-likelihood from nlitmweibullgpd and nluitmweibullgpd. Profile likelihood for threshold and interval half-width given by profluitmweibullgpd. Fitting function fitmweibullgpd returns a simple list with the following elements

call: optim call
x: data vector x
init: pvector
fixedeu: fixed epsilon and threshold, logical
useq: threshold vector for profile likelihood or scalar for fixed threshold
eseq: epsilon vector for profile likelihood or scalar for fixed epsilon
nllheuseq: profile negative log-likelihood at each combination in (eseq, 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
nllh: minimum negative log-likelihood
n: total sample size
wshape: MLE of Weibull shape
wscale: MLE of Weibull scale
epsilon: MLE of transition half-width
u: threshold (fixed or MLE)
sigmau: MLE of GPD scale
xi: MLE of GPD shape

Acknowledgments

See Acknowledgments in fnormgpd, type help fnormgpd.

Note

When pvector=NULL then the initial values are:

Author(s)

Alfadino Akbar and Carl Scarrott carl.scarrott@canterbury.ac.nz

References

http://www.math.canterbury.ac.nz/~c.scarrott/evmix

http://en.wikipedia.org/wiki/Weibull_distribution

http://en.wikipedia.org/wiki/Generalized_Pareto_distribution

Holden, L. and Haug, O. (2013). A mixture model for unsupervised tail estimation. arxiv:0902.4137

See Also

dweibull, fgpd and gpd

Other weibullgpd: fweibullgpdcon, fweibullgpd, itmweibullgpd, weibullgpdcon, weibullgpd

Other itmweibullgpd: fweibullgpdcon, fweibullgpd, itmweibullgpd, weibullgpdcon, weibullgpd

Other fitmweibullgpd: itmweibullgpd

Examples

## Not run: 
set.seed(1)
par(mfrow = c(1, 1))

x = rweibull(1000, shape = 1, scale = 2)
xx = seq(-0.2, 10, 0.01)
y = dweibull(xx, shape = 1, scale = 2)

# MLE for complete parameter set
fit = fitmweibullgpd(x)
hist(x, breaks = seq(0, 20, 0.1), freq = FALSE, xlim = c(-0.2, 10))
lines(xx, y)
with(fit, lines(xx, ditmweibullgpd(xx, wshape, wscale, epsilon, u, sigmau, xi), col="red"))
abline(v = fit$u + fit$epsilon * seq(-1, 1), col = "red")
  
# Profile likelihood for threshold which is then fixed
fitfix = fitmweibullgpd(x, eseq = seq(0, 2, 0.1), useq = seq(0.5, 4, 0.1), fixedeu = TRUE)
with(fitfix, lines(xx, ditmweibullgpd(xx, wshape, wscale, epsilon, u, sigmau, xi), col="blue"))
abline(v = fitfix$u + fitfix$epsilon * seq(-1, 1), col = "blue")
legend("topright", c("True Density", "Weibull-GPD ITM", "Profile likelihood"),
  col=c("black", "red", "blue"), lty = 1)

## End(Not run)
  

[Package evmix version 2.12 Index]