Description Usage Arguments Value Author(s) See Also Examples
Cumulative distribution function and quantiles for the distribution
of a GPD object (as produced for example by the semi-parametric estimation
procedure gpd.tail
).
1 2 3 4 5 |
x |
A numeric vector of values at which the cdf is computed |
p |
A numeric vector of probabilities at which the quantiles are computed |
est.object |
An object of class |
OPTIONAL ARGUMENTS |
|
linear |
A boolean. If |
Functions gpd.1p
and gpd.2p
return a vector of the same
length as x
comprising the values of the cumulative distribution
function of the distribution determined by est.obj
computed at the
points x
.
Functions gpd.1q
and gpd.2q
return a vector of the same
length as q
comprising the values of the quantiles of the distribution
determined by est.obj
computed at the points q
.
Rene Carmona, rcarmona@princeton.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # One tail
data("BCofLRet")
NZ <- (BCofLRet !=0)
BLRet <- BCofLRet[NZ]
X <- BLRet[BLRet > 0]
x.est <- gpd.tail(X)
y <- c(10:500)/1000
plot(y, gpd.1p(y,x.est), log = "x", type = "l")
big.X <- sort(X) > 0.01
points((sort(X))[big.X], (ppoints(sort(X)))[big.X])
# random generation from this distribution:
data("BCofLRet")
NZ <- (BCofLRet !=0)
BLRet <- BCofLRet[NZ]
X <- BLRet[BLRet != 0]
x.est <- gpd.tail(X, upper = 0.015, lower = -0.015, method = "lmom")
n <- length(X)
Y <- gpd.2q(runif(n), x.est)
plot(X, ylim = c(-0.3,0.3))
plot(Y, col = 4, , ylim = c(-0.3,0.3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.