Learn R Programming

Newdistns (version 1.0)

tessg: Truncated-exponential skew-symmetric G distribution

Description

Computes the pdf, cdf, quantile and random numbers of the truncated-exponential skew-symmetric G distribution due to Nadarajah et al. (2013) specified by the pdf $$f (x) = \frac {\lambda}{1 - \exp (-\lambda)} g(x) \exp \left{ -\lambda G(x) \right}$$ for $G$ any valid cdf, $g$ the corresponding pdf, and $-\infty < \lambda < \infty$, the skewness parameter.

Usage

dtessg(x, spec, lambda = 1, log = FALSE, ...)
ptessg(x, spec, lambda = 1, log.p = FALSE, lower.tail = TRUE, ...)
qtessg(p, spec, lambda = 1, log.p = FALSE, lower.tail = TRUE, ...)
rtessg(n, spec, lambda = 1, ...)

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 quantile needs to be computed
n
number of random numbers to be generated
lambda
the value of skewness parameter, can be any real value, the default is 1
spec
a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).
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
...
other parameters

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 quantile values computed at p or an object of the same length as n, giving the random numbers generated.

References

S. Nadarajah, Newdistns: An R Package for new families of distributions, submitted S. Nadarajah, V. Nassiri, A. Mohammadpour, Truncated-exponential skew-symmetric distributions, Statistics, to appear

Examples

Run this code
x=runif(10,min=0,max=1)
dtessg(x,"exp",lambda=1)
ptessg(x,"exp",lambda=1)
qtessg(x,"exp",lambda=1)
rtessg(10,"exp",lambda=1)

Run the code above in your browser using DataLab