Density, distribution function, quantile function and random generation for the MGPD distribution.
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)
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.
vector of quantiles.
shape parameter of the tail GPD (scalar).
scale parameter of the tail GPD (scalar).
threshold parameter of the tail GPD (scalar).
means of the gamma mixture components (vector).
shapes of the gamma mixture components (vector).
weights of the gamma mixture components (vector). Must sum to one.
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE (default), probabilities are \(P(X\leq x)\) otherwise \(P(X>x)\).
vector of probabilities.
number of observations.
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.
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.
dmgpd(3, xi = 0.5, sigma = 2,5, u = 5, mu = c(2,3), eta = c(1,2), w = c(0.3,0.7))
Run the code above in your browser using DataLab