mgpd {extrememix} | R Documentation |
The MGPD distribution
Description
Density, distribution function, quantile function and random generation for the MGPD distribution.
Usage
dmgpd(x, xi, sigma, u, mu, eta, w, log = FALSE)
pmgpd(q, xi, sigma, u, mu, eta, w, lower.tail = TRUE)
qmgpd(p, xi, sigma, u, mu, eta, w, lower.tail = TRUE)
rmgpd(N, xi, sigma, u, mu, eta, w)
Arguments
x , q |
vector of quantiles. |
xi |
shape parameter of the tail GPD (scalar). |
sigma |
scale parameter of the tail GPD (scalar). |
u |
threshold parameter of the tail GPD (scalar). |
mu |
means of the gamma mixture components (vector). |
eta |
shapes of the gamma mixture components (vector). |
w |
weights of the gamma mixture components (vector). Must sum to one. |
log |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
N |
number of observations. |
Details
The MGPD distribution is an extreme value mixture model with density
f_{MGPD}(x|\xi,\sigma,u,\mu,\eta,w)=\left\{\begin{array}{ll} f_{MG}(x|\mu,\eta,w), & x\leq u \\ (1-F_{MG}(u|\mu,\eta,w))f_{GPD}(x|\xi,\sigma,u), &\mbox{otherwise}, \end{array}\right.
where f_{MG}
is the density of the mixture of Gammas, F_{MG}
is the distribution function of the mixture of Gammas and f_{GPD}
is the density of the Generalized Pareto Distribution, i.e.
f_{GPD}(x|\xi,\sigma,u)=\left\{\begin{array}{ll} 1- (1+\frac{\xi}{\sigma}(x-u))^{-1/\xi}, & \mbox{if } \xi\neq 0,\\ 1- \exp\left(-\frac{x-u}{\sigma}\right), & \mbox{if } \xi = 0, \end{array}\right.
where \xi
is a shape parameter, \sigma > 0
is a scale parameter and u>0
is a threshold.
Value
dmgpd
gives the density, pmgpd
gives the distribution function, qmgpd
gives the quantile function, and rmgpd
generates random deviates. The length of the result is determined by N
for rmgpd
and by the length of x
, q
or p
otherwise.
References
do Nascimento, Fernando Ferraz, Dani Gamerman, and Hedibert Freitas Lopes. "A semiparametric Bayesian approach to extreme value estimation." Statistics and Computing 22.2 (2012): 661-675.
Examples
dmgpd(3, xi = 0.5, sigma = 2,5, u = 5, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))