Learn R Programming

sn (version 1.0-0)

dst: Skew-$t$ Distribution

Description

Density function, distribution function, quantiles and random number generation for the skew-$t$ (ST) distribution

Usage

dst(x, xi=0, omega=1, alpha=0, nu=Inf, dp=NULL, log=FALSE) 
pst(x, xi=0, omega=1, alpha=0, nu=Inf, dp=NULL, ...)
qst(p, xi=0, omega=1, alpha=0, nu=Inf, tol=1e-08, dp=NULL, ...)
rst(n=1, xi=0, omega=1, alpha=0, nu=Inf, dp=NULL)

Arguments

x
vector of quantiles. Missing values (NAs) are allowed.
p
vector of probabililities.
xi
vector of location parameters.
omega
vector of scale parameters; must be positive.
alpha
vector of slant parameters. With pst and qst, it must be of length 1.
nu
degrees of freedom (scalar); default is nu=Inf which corresponds to the skew-normal distribution.
dp
a vector of length 4, whose elements represent location, scale (positive), slant and degrees of freedom, respectively. If dp is specified, the individual parameters cannot be set.
n
sample size
log
logical; if TRUE, densities are given as log-densities
tol
a scalar value which regulates the accuracy of the result of qsn.
...
additional parameters passed to integrate

Value

  • Density (dst), probability (pst), quantiles (qst) and random sample (rst) from the skew-$t$ distribution with given xi, omega, alpha and nu parameters.

Details

Typical usages are 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, ...) pst(x, dp=, log=FALSE) qst(p, xi=0, omega=1, alpha=0, nu=Inf, tol=1e-8, ...) qst(x, dp=, log=FALSE) rst(n=1, xi=0, omega=1, alpha=0, nu=Inf) rst(x, dp=, log=FALSE)

Background

The family of skew-t distributions is an extension of the Student's $t$ family, via the introduction of a alpha parameter which regulates skewness; when alpha=0, the skew-$t$ distribution reduces to the usual Student's $t$ distribution. When nu=Inf, it reduces to the skew-normal distribution. A multivariate version of the distribution exists. See Chapter 4 of the reference below for additional information.

References

Azzalini, A. and Capitanio, A. (2014). The Skew-normal and Related Families. Cambridge University Press, IMS Monographs series.

See Also

dmst, dsn

Examples

Run this code
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.5,0.75), alpha=3, nu=5)
pst(q, alpha=3, nu=5)  # must give back c(0.25,0.5,0.75)

Run the code above in your browser using DataLab