Learn Python and AI for free! One week only. No credit card needed.
Ends in:
wshape
and
scale wscale
, threshold u
GPD scale
sigmau
and shape xi
and tail fraction
phiu
.dweibullgpd(x, wshape = 1, wscale = 1,
u = qweibull(0.9, wshape, wscale),
sigmau = sqrt(wscale^2 * gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
xi = 0, phiu = TRUE, log = FALSE)
pweibullgpd(q, wshape = 1, wscale = 1,
u = qweibull(0.9, wshape, wscale),
sigmau = sqrt(wscale^2 * gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
xi = 0, phiu = TRUE, lower.tail = TRUE)
qweibullgpd(p, wshape = 1, wscale = 1,
u = qweibull(0.9, wshape, wscale),
sigmau = sqrt(wscale^2 * gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
xi = 0, phiu = TRUE, lower.tail = TRUE)
rweibullgpd(n = 1, wshape = 1, wscale = 1,
u = qweibull(0.9, wshape, wscale),
sigmau = sqrt(wscale^2 * gamma(1 + 2/wshape) - (wscale * gamma(1 + 1/wshape))^2),
xi = 0, phiu = TRUE)
dweibullgpd
gives the
density, pweibullgpd
gives the cumulative distribution function,
qweibullgpd
gives the
quantile function and
rweibullgpd
gives a
random sample.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
Weibull bulk model.
The cumulative distribution function with tail fraction
$\phi_u$ defined by the upper tail fraction of the
Weibull bulk model (phiu=TRUE
), upto the threshold
$0 \le x \le u$, given by: pweibull(x, wshape, wscale)
and
pgpd(x, u, sigmau, xi)
).
The cumulative distribution function for pre-specified
$\phi_u$, upto the threshold $0 \le x \le u$, is
given by: gpd
for details of GPD upper
tail component and dweibull
for details of Weibull bulk component.gpd
and
dweibull
Other weibullgpd: fweibullgpd
,
lweibullgpd
, nlweibullgpd
par(mfrow=c(2,2))
x = rweibullgpd(1000)
xx = seq(-1, 6, 0.01)
hist(x, breaks = 100, freq = FALSE, xlim = c(-1, 6))
lines(xx, dweibullgpd(xx))
# three tail behaviours
plot(xx, pweibullgpd(xx), type = "l")
lines(xx, pweibullgpd(xx, xi = 0.3), col = "red")
lines(xx, pweibullgpd(xx, xi = -0.3), col = "blue")
legend("topleft", paste("xi =",c(0, 0.3, -0.3)),
col=c("black", "red", "blue"), lty = 1)
x = rweibullgpd(1000, phiu = 0.2)
hist(x, breaks = 100, freq = FALSE, xlim = c(-1, 6))
lines(xx, dweibullgpd(xx, phiu = 0.2))
plot(xx, dweibullgpd(xx, xi=0, phiu = 0.2), type = "l")
lines(xx, dweibullgpd(xx, xi=-0.2, phiu = 0.2), col = "red")
lines(xx, dweibullgpd(xx, xi=0.2, phiu = 0.2), col = "blue")
legend("topleft", c("xi = 0", "xi = 0.2", "xi = -0.2"),
col=c("black", "red", "blue"), lty = 1)
Run the code above in your browser using DataLab