Density function, distribution function, quantiles and random number generation for the skewt (ST) distribution
1 2 3 4 
x 
vector of quantiles. Missing values ( 
p 
vector of probabililities. 
xi 
vector of location parameters. 
omega 
vector of scale parameters; must be positive. 
alpha 
vector of slant parameters. With 
nu 
a single positive value representing the degrees of freedom;
it can be noninteger. Default value is 
dp 
a vector of length 4, whose elements represent location, scale
(positive), slant and degrees of freedom, respectively. If 
n 
a positive integer representing the sample size. 
log 
logical; if TRUE, densities are given as logdensities 
tol 
a scalar value which regulates the accuracy of the result of

method 
an integer value between 
... 
additional parameters passed to 
Density (dst
), probability (pst
), quantiles (qst
)
and random sample (rst
) from the skewt distribution with given
xi
, omega
, alpha
and nu
parameters.
Typical usages are
1 2 3 4 5 6 7 8  dst(x, xi=0, omega=1, alpha=0, nu=Inf, log=FALSE)
dst(x, dp=, log=FALSE)
pst(x, xi=0, omega=1, alpha=0, nu=Inf, method=0, ...)
pst(x, dp=, log=FALSE)
qst(p, xi=0, omega=1, alpha=0, nu=Inf, tol=1e8, method=0, ...)
qst(x, dp=, log=FALSE)
rst(n=1, xi=0, omega=1, alpha=0, nu=Inf)
rst(x, dp=, log=FALSE)

The family of skewt distributions is an extension of the Student's
t family, via the introduction of a alpha
parameter which
regulates skewness; when alpha=0
, the skewt distribution
reduces to the usual Student's t distribution.
When nu=Inf
, it reduces to the skewnormal distribution.
When nu=1
, it reduces to a form of skewCauchy distribution.
See Chapter 4 of Azzalini & Capitanio (2014) for additional information.
A multivariate version of the distribution exists; see dmst
.
For evaluation of pst
, and so indirectly of
qst
, four different methods are employed.
Method 1 consists in using pmst
with dimension d=1
.
Method 2 applies integrate
to the density function dst
.
Method 3 again uses integrate
too but with a different integrand,
as given in Section 4.2 of Azzalini & Capitanio (2003), full version of
the paper.
Method 4 consists in the recursive procedure of Jamalizadeh, Khosravi and
Balakrishnan (2009), which is recalled in Complement 4.3 on
Azzalini & Capitanio (2014); the recursion over nu
starts from
the explicit expression for nu=1
given by psc
.
Of these, Method 1 and 4 are only suitable for integer values of nu
.
Method 4 becomes progressively less efficient as nu
increases,
because its value corresponds to the number of nested calls, but the
decay of efficiency is slower for larger values of length(x)
.
If the default argument value method=0
is retained, an automatic choice
among the above four methods is made, which depends on the values of
nu, alpha, length(x)
. The numerical accuracy of methods 1, 2 and 3 can
be regulated via the ...
argument, while method 4 is conceptually exact,
up to machine precision.
If qst
is called with nu>1e4
, computation is transferred to
qsn
.
Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skewt distribution. J.Roy. Statist. Soc. B 65, 367–389. Full version of the paper at http://arXiv.org/abs/0911.2342.
Azzalini, A. with the collaboration of Capitanio, A. (2014). The Skewnormal and Related Families. Cambridge University Press, IMS Monographs series.
Jamalizadeh, A., Khosravi, M., and Balakrishnan, N. (2009). Recurrence relations for distributions of a skew$t$ and a linear combination of order statistics from a bivariate$t$. Comp. Statist. Data An. 53, 847–852.
1 2 3 4 5 6 7  pdf < dst(seq(4, 4, by=0.1), alpha=3, nu=5)
rnd < rst(100, 5, 2, 5, 8)
q < qst(c(0.25, 0.50, 0.75), alpha=3, nu=5)
pst(q, alpha=3, nu=5) # must give back c(0.25, 0.50, 0.75)
#
p1 < pst(x=seq(3,3, by=1), dp=c(0,1,pi, 3.5))
p2 < pst(x=seq(3,3, by=1), dp=c(0,1,pi, 3.5), method=2, rel.tol=1e9)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.