Learn R Programming

exdqlm (version 0.3.0)

dexal: Density Function for the Extended Asymmetric Laplace (exAL) Distribution

Description

Computes the PDF of the Extended Asymmetric Laplace (exAL) distribution. Vectorized over x.

Usage

dexal(x, p0 = 0.5, mu = 0, sigma = 1, gamma = 0, log = FALSE)

Value

Numeric vector of densities (same length as x).

Arguments

x

Numeric vector of quantiles.

p0

Probability level used in the quantile parametrization. Scalar in (0, 1). Default 0.5.

mu

Location parameter (scalar). Default 0.

sigma

Scale parameter (scalar, strictly positive). Default 1.

gamma

Skewness parameter controlling asymmetry (scalar). Must be within valid bounds implied by p0. Default 0.

log

Logical scalar; if TRUE return log-density. Default FALSE.

Examples

Run this code
dexal(0)
dexal(1, p0 = 0.75, mu = 0, sigma = 2, gamma = 0.25)
dexal(seq(-3, 3, by = 0.1), p0 = 0.3, mu = 0, sigma = 1, gamma = -0.45)

Run the code above in your browser using DataLab