gpd.cdf {Rsafd} | R Documentation |
Cumulative distribution function and quantiles for the distribution
of a GPD object (as produced for example by the semi-parametric estimation
procedure gpd.tail
).
gpd.1p(x, est.object, linear = TRUE) gpd.1q(p, est.object, linear = TRUE) gpd.2p(x, est.object, linear = TRUE) gpd.2q(p, est.object, linear = TRUE)
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
# 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))