gshape
and scale gscale
, threshold u
GPD scale sigmau
and shape xi
and tail
fraction phiu
.dmgammagpd(x, mgshape = list(1), mgscale = list(1),
mgweights = NULL,
u = qgamma(0.9, mgshape[[1]], 1/mgscale[[1]]),
sigmau = sqrt(mgshape[[1]]) * mgscale[[1]], xi = 0,
phiu = TRUE, log = FALSE)
pmgammagpd(q, mgshape = list(1), mgscale = list(1),
mgweights = NULL,
u = qgamma(0.9, mgshape[[1]], 1/mgscale[[1]]),
sigmau = sqrt(mgshape[[1]]) * mgscale[[1]], xi = 0,
phiu = TRUE, lower.tail = TRUE)
qmgammagpd(p, mgshape = list(1), mgscale = list(1),
mgweights = NULL,
u = qgamma(0.9, mgshape[[1]], 1/mgscale[[1]]),
sigmau = sqrt(mgshape[[1]]) * mgscale[[1]], xi = 0,
phiu = TRUE, lower.tail = TRUE)
rmgammagpd(n = 1, mgshape = list(1), mgscale = list(1),
mgweights = NULL,
u = qgamma(0.9, mgshape[[1]], 1/mgscale[[1]]),
sigmau = sqrt(mgshape[[1]]) * mgscale[[1]], xi = 0,
phiu = TRUE)
NULL
dmgammagpd
gives the
density, pmgammagpd
gives
the cumulative distribution function,
qmgammagpd
gives the
quantile function and
rmgammagpd
gives a random
sample.mgshape
and
mgscale
. The number of objects in the parameters
lists determines the number of components. The parameter
object for each gamma component can either be a scalar or
vector, consistent with the other mixture models
If mgweights=NULL
then assumes equal weights for
each component. Otherwise, mgweights
must be a
list of the same length as mgshape
and
mgscale
, filled with positive values. In the
latter case, the weights are rescaled to sum to unity.
The user can pre-specify phiu
permitting a
parameterised value for the tail fraction $\phi_u$.
Alternatively, when phiu=TRUE
the tail fraction is
estimated as the tail fraction from the gamma bulk model.
The cumulative distribution function with tail fraction
$\phi_u$ defined by the upper tail fraction of the
gamma bulk model (phiu=TRUE
), upto the threshold
$0 < x \le u$, given by: $$F(x) = H(x)$$ and above
the threshold $x > u$: $$F(x) = H(u) + [1 - H(u)]
G(x)$$ where $H(x)$ and $G(X)$ are the mixture of
gammas and conditional GPD cumulative distribution
functions respectively.
The cumulative distribution function for pre-specified
$\phi_u$, upto the threshold $0 < x \le u$, is
given by: $$F(x) = (1 - \phi_u) H(x)/H(u)$$ and above
the threshold $x > u$: $$F(x) = \phi_u + [1 -
\phi_u] G(x)$$ Notice that these definitions are
equivalent when $\phi_u = 1 - H(u)$.
The gamma is defined on the non-negative reals, so the
threshold must be non-negative.
See gammagpd
for details of
simpler parametric mixture model with single gamma for
bulk component and GPD for upper tail.gammagpd
,
mgammagpd
,
gpd
and
dgamma