Density, cumulative distribution, quantile functions and random
generation for the S distribution with the location parameter mu
and a scaling parameter b.
Usage
ds(q, mu = 0, b = 1, log = FALSE)
ps(q, mu = 0, b = 1)
qs(p, mu = 0, b = 1)
rs(n = 1, mu = 0, b = 1)
Arguments
q
vector of quantiles.
mu
vector of location parameters (means).
b
vector of scaling parameter (which equals to ham/2).
log
if TRUE, then probabilities are returned in
logarithms.
p
vector of probabilities.
n
number of observations. Should be a single number.
Value
Depending on the function, various things are returned
(usually either vector or scalar):
ds returns the density function value for the
provided parameters.
ps returns the value of the cumulative function
for the provided parameters.
qs returns quantiles of the distribution. Depending
on what was provided in p, mu and b, this
can be either a vector or a matrix, or an array.
rs returns a vector of random variables
generated from the S distribution. Depending on what was provided
in mu and b, this can be either a vector or a matrix
or an array.
Details
When mu=0 and ham=2, the S distribution becomes standardized with
b=1 (this is because b=ham/2). The distribution has the following
density function:
f(x) = 1/(4b^2) exp(-sqrt(abs(x-mu)) / b)
The S distribution has fat tails and large excess.