Learn R Programming

neodistr (version 0.1.2)

jsep: Jones Skew Exponential Power

Description

To calculate density function, distribution function, quantile function, and build data from random generator function for the Jones Skew Exponential Power

Usage

djsep(x, mu = 0, sigma = 1, alpha = 2, beta = 2, log = FALSE)

pjsep( q, mu = 0, sigma = 1, alpha = 2, beta = 2, lower.tail = TRUE, log.p = FALSE )

qjsep( p, mu = 0, sigma = 1, alpha = 2, beta = 2, lower.tail = TRUE, log.p = FALSE )

rjsep(n, mu = 0, sigma = 1, alpha = 2, beta = 2)

Value

djsep gives the density , pjsep gives the distribution function, qjsep gives quantiles function, rjsep generates random numbers.

Arguments

x, q

vector of quantiles.

mu

a location parameter.

sigma

a scale parameter.

alpha

a shape parameter (left tail heaviness parameter).

beta

a shape parameter (right tail heaviness parameter).

log, log.p

logical; if TRUE, probabilities p are given as log(p) The default value of this parameter is FALSE

lower.tail

logical;if TRUE (default), probabilities are \(P\left[ X\leq x\right]\), otherwise, \(P\left[ X>x\right] \).

p

vectors of probabilities.

n

number of observations.

Author

Meischa Zahra Nur Adhelia

Details

Jones Skew Exponential Power

The Jones Skew Exponential Power with parameters \(\mu\), \(\sigma\),\(\alpha\), and \(\beta\) has density: $$ f(y | \mu, \sigma, \alpha, \beta) = \left\{ \begin{array}{ll} \frac{c}{\sigma} \exp\left(-|z|^{\alpha}\right), & \text{if } y < \mu \\ \frac{c}{\sigma} \exp\left(-|z|^{\beta}\right), & \text{if } y \geq \mu \end{array} \right. $$ where: $$z = \frac{y - \mu}{\sigma},$$ $$c = \left[ \Gamma(1 + \beta^{-1}) + \Gamma(1 + \alpha^{-1}) \right]^{-1}.$$

References

Rigby, R.A. and Stasinopoulos, M.D. and Heller, G.Z. and De Bastiani, F. (2019) Distributions for Modeling Location, Scale, and Shape: Using GAMLSS in R.CRC Press

Examples

Run this code
djsep(4, mu=0, sigma=1, alpha=2, beta=2)
pjsep(4, mu=0, sigma=1, alpha=2, beta=2)
qjsep(0.5, mu=0, sigma=1, alpha=2, beta=2)
rjsep(4, mu=0, sigma=1, alpha=2, beta=2)

Run the code above in your browser using DataLab