# gpd.1p: CUMULATIVE DISTRIBUTION AND QNTILE FUNCTIONS OF A GPD OBJECT In Rsafd: Statistical Analysis of Financial Data in R

## Description

Cumulative distribution function and quantiles for the distribution of a GPD object (as produced for example by the semi-parametric estimation procedure `gpd.tail`).

## Usage

 ```1 2 3 4 5``` ``` 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) ```

## Arguments

 `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 `gpd` as the output of `gpd.tail`. `OPTIONAL ARGUMENTS` `linear` A boolean. If `TRUE` (default), the empirical cdf and quantile function are linearly interpolated for `lower < x < upper`. If `FALSE`, the empirical cdf and quantile function are returned for `lower < x < upper`.

## Value

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`.

## Author(s)

Rene Carmona, [email protected]

`pgpd`, `qgpd`
 ``` 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)) ```