Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SkewLaplace

Skew Laplace Distribution


Description

These functions provide information about the skew Laplace distribution with location parameter equal to m, dispersion equal to s, and skew equal to f: density, cumulative distribution, quantiles, log hazard, and random generation. For f=1, this is an ordinary (symmetric) Laplace distribution.

The skew Laplace distribution has density

f(y) = f*exp(-f*(y-m)/s)/((1+f^2)*s)

if y>=m and else

f(y) = f*exp((y-m)/(f*s))/((1+f^2)*s)

where m is the location parameter of the distribution, s is the dispersion, and f is the skew.

The mean is given by m + (s * (1 - f^2)) / (sqrt(2) * f) and the variance by (s^2 * (1 + f^4)) / (2 * f^2).

Note that this parametrization of the skew (family) parameter is different than that used for the multivariate skew Laplace distribution in elliptic.

Usage

dskewlaplace(y, m=0, s=1, f=1, log=FALSE)
pskewlaplace(q, m=0, s=1, f=1)
qskewlaplace(p, m=0, s=1, f=1)
rskewlaplace(n, m=0, s=1, f=1)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of location parameters.

s

vector of dispersion parameters.

f

vector of skew parameters.

log

if TRUE, log probabilities are supplied.

Author(s)

J.K. Lindsey

See Also

dexp for the exponential distribution, dcauchy for the Cauchy distribution, and dlaplace for the Laplace distribution.

Examples

dskewlaplace(5, 2, 1, 0.5)
pskewlaplace(5, 2, 1, 0.5)
qskewlaplace(0.95, 2, 1, 0.5)
rskewlaplace(10, 2, 1, 0.5)

rmutil

Utilities for Nonlinear Regression and Repeated Measurements Models

v1.1.5
GPL-2
Authors
Bruce Swihart [cre, aut], Jim Lindsey [aut] (Jim created this package, Bruce is maintaining the CRAN version)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.