Learn R Programming

sn (version 0.30)

dst: Skew-t Distribution

Description

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

Usage

dst(x, location=0, scale=1, shape=0, df=Inf)
pst(x, location=0, scale=1, shape=0, df=Inf, ...)
rst(n=1, location=0, scale=1, shape=0, df=Inf)

Arguments

x
vector of quantiles. Missing values (NAs) are allowed.
location
vector of location parameters.
scale
vector of (positive) scale parameters.
shape
vector of shape parameters. With pst, it must be of length 1.
df
degrees of freedom (scalar); default is df=Inf which corresponds to the skew-normal distribution.
n
sample size.
...
additional parameters passed to pmvt.

Value

  • Density (dst), probability (pst) and random sample (rst) from the skew-t distribution with given location, scale, shape and df parameters.

Background

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

Details

pst requires library(mvtnorm).

References

Azzalini, A. and Capitanio, A. (2002). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t distribution. Submitted to J.Roy. Statist. Soc.

See Also

dmst, dsn, mst.mle

Examples

Run this code
pdf <- dst(seq(-4,4,by=0.1), shape=3, df=5)
rnd <- rst(100, 5, 2, -5, 8)
library(mvtnorm)              # only once in the session
cdf <- pst(seq(-4,4,by=0.1), shape=3, df=5)

Run the code above in your browser using DataLab