Description Usage Arguments Details Value Acknowledgments Note Author(s) References See Also Examples
Maximum likelihood estimation for fitting the extreme value mixture model with the normal 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | fitmnormgpd(x, eseq = NULL, useq = NULL, fixedeu = FALSE,
pvector = NULL, std.err = TRUE, method = "BFGS",
control = list(maxit = 10000), finitelik = TRUE, ...)
litmnormgpd(x, nmean = 0, nsd = 1, epsilon = nsd, u = qnorm(0.9,
nmean, nsd), sigmau = nsd, xi = 0, log = TRUE)
nlitmnormgpd(pvector, x, finitelik = FALSE)
profleuitmnormgpd(eu, pvector, x, method = "BFGS", control = list(maxit
= 10000), finitelik = TRUE, ...)
nleuitmnormgpd(pvector, epsilon, u, x, finitelik = FALSE)
|
x |
vector of sample data |
eseq |
vector of epsilons (or scalar) to be considered in profile likelihood or
|
useq |
vector of thresholds (or scalar) to be considered in profile likelihood or
|
fixedeu |
logical, should threshold and epsilon be fixed
(at either scalar value in |
pvector |
vector of initial values of parameters or |
std.err |
logical, should standard errors be calculated |
method |
optimisation method (see |
control |
optimisation control list (see |
finitelik |
logical, should log-likelihood return finite value for invalid parameters |
... |
optional inputs passed to |
nmean |
scalar normal mean |
nsd |
scalar normal standard deviation (positive) |
epsilon |
interval half-width |
u |
scalar threshold value |
sigmau |
scalar scale parameter (positive) |
xi |
scalar shape parameter |
log |
logical, if |
eu |
vector of epsilon and threshold pair considered in profile likelihood |
The extreme value mixture model with the normal 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 ditmnormgpd
for explanation of normal-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
(nmean
, nsd
, epsilon
, u
, sigmau
, xi
)
if threshold and interval half-width are both estimated and
(nmean
, nsd
, 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.
Log-likelihood is given by litmnormgpd
and it's
wrappers for negative log-likelihood from nlitmnormgpd
and nluitmnormgpd
. Profile likelihood for
threshold and interval half-width given by profluitmnormgpd
.
Fitting function fitmnormgpd
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 |
nmean : | MLE of normal shape |
nsd : | MLE of normal scale |
epsilon : | MLE of transition half-width |
u : | threshold (fixed or MLE) |
sigmau : | MLE of GPD scale |
xi : | MLE of GPD shape |
See Acknowledgments in
fnormgpd
, type help fnormgpd
.
When pvector=NULL
then the initial values are:
MLE of normal parameters assuming entire population is normal; and
epsilon is MLE of normal standard deviation;
threshold 90% quantile (not relevant for profile likelihood for threshold or fixed threshold approaches);
MLE of GPD parameters above threshold.
Alfadino Akbar and Carl Scarrott carl.scarrott@canterbury.ac.nz
http://www.math.canterbury.ac.nz/~c.scarrott/evmix
http://en.wikipedia.org/wiki/normal_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
Other normgpd: fgng
, fhpd
,
flognormgpd
, fnormgpdcon
,
fnormgpd
, gngcon
,
gng
, hpdcon
,
hpd
, itmnormgpd
,
lognormgpdcon
, lognormgpd
,
normgpdcon
, normgpd
Other itmnormgpd: fitmgng
,
itmgng
, itmnormgpd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
set.seed(1)
par(mfrow = c(1, 1))
x = rnorm(1000)
xx = seq(-4, 4, 0.01)
y = dnorm(xx)
# MLE for complete parameter set
fit = fitmnormgpd(x)
hist(x, breaks = seq(-6, 6, 0.1), freq = FALSE, xlim = c(-4, 4))
lines(xx, y)
with(fit, lines(xx, ditmnormgpd(xx, nmean, nsd, 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 = fitmnormgpd(x, eseq = seq(0, 2, 0.1), useq = seq(0, 2.5, 0.1), fixedeu = TRUE)
with(fitfix, lines(xx, ditmnormgpd(xx, nmean, nsd, epsilon, u, sigmau, xi), col="blue"))
abline(v = fitfix$u + fitfix$epsilon * seq(-1, 1), col = "blue")
legend("topright", c("True Density", "normal-GPD ITM", "Profile likelihood"),
col=c("black", "red", "blue"), lty = 1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.