# PCTAlaplace: Poiraud-Casanova-Thomas-Agnan Laplace distribution

Description Usage Arguments Value Author(s) References Examples

### Description

Computes the pdf, cdf, value at risk and expected shortfall for the Poiraud-Casanova-Thomas-Agnan Laplace distribution due to Poiraud-Casanova and Thomas-Agnan (2000) given by

\begin{array}{ll} &\displaystyle f (x) = ≤ft\{ \begin{array}{ll} \displaystyle a ≤ft( 1 - a \right) \exp ≤ft\{ ≤ft( 1 - a \right) ≤ft( x - θ \right) \right\}, & \mbox{if $x ≤q θ$,} \\ \\ \displaystyle a ≤ft( 1 - a \right) \exp ≤ft\{ a ≤ft( θ - x \right) \right\}, & \mbox{if $x > θ$,} \end{array} \right. \\ &\displaystyle F (x) = ≤ft\{ \begin{array}{ll} \displaystyle a \exp ≤ft\{ ≤ft( 1 - a \right) ≤ft( x - θ \right) \right\}, & \mbox{if $x ≤q θ$,} \\ \\ \displaystyle 1 - ≤ft( 1 - a \right) \exp ≤ft\{ a ≤ft( θ - x \right) \right\}, & \mbox{if $x > θ$,} \end{array} \right. \\ &\displaystyle {\rm VaR}_p (X) = ≤ft\{ \begin{array}{ll} \displaystyle θ + \frac {1}{1 - a} \log ≤ft( \frac {p}{a} \right), & \mbox{if $p ≤q a$,} \\ \\ \displaystyle θ - \frac {1}{a} \log ≤ft( \frac {1 - p}{1 - a} \right), & \mbox{if $p > a$,} \end{array} \right. \\ &\displaystyle {\rm ES}_p (X) = ≤ft\{ \begin{array}{ll} \displaystyle θ - \frac {\log a}{1 - a} + \frac {\log p - 1}{(1 - a) p}, & \mbox{if $p ≤q a$,} \\ \\ \displaystyle θ - \frac {1}{a} + \frac {1}{p} - \frac {a}{(1 - a) p} + \frac {1 - p}{a p} \log ≤ft( \frac {1 - p}{1 - a} \right), & \mbox{if $p > a$} \end{array} \right. \end{array}

for -∞ < x < ∞, 0 < p < 1, -∞ < θ < ∞, the location parameter, and a > 0, the scale parameter.

### Usage

 1 2 3 4 dPCTAlaplace(x, a=0.5, theta=0, log=FALSE) pPCTAlaplace(x, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE) varPCTAlaplace(p, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE) esPCTAlaplace(p, a=0.5, theta=0) 

### Arguments

 x scaler or vector of values at which the pdf or cdf needs to be computed p scaler or vector of values at which the value at risk or expected shortfall needs to be computed theta the value of the location parameter, can take any real value, the default is zero a the value of the scale parameter, must be in the unit interval, the default is 0.5 log if TRUE then log(pdf) are returned log.p if TRUE then log(cdf) are returned and quantiles are computed for exp(p) lower.tail if FALSE then 1-cdf are returned and quantiles are computed for 1-p

### Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the values at risk or expected shortfall computed at p.

### References

S. Nadarajah, S. Chan and E. Afuecheta, An R Package for value at risk and expected shortfall, submitted

### Examples

 1 2 3 4 5 x=runif(10,min=0,max=1) dPCTAlaplace(x) pPCTAlaplace(x) varPCTAlaplace(x) esPCTAlaplace(x) 

Search within the VaRES package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.