Learn R Programming

sn (version 1.2-2)

dmst: Multivariate skew-$t$ distribution and skew-Cauchy distribution

Description

Probability density function, distribution function and random number generation for the multivariate skew-$t$ (ST) and skew-Cauchy (SC) distributions.

Usage

dmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL, log=FALSE)
pmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL, ...)
rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL)
dmsc(x, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL, log=FALSE)
pmsc(x, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL, ...)
rmsc(n=1, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL)

Arguments

x
for dmst and dmsc, this is either a vector of length d, where d=length(alpha), or a matrix with d columns, representing the coordinates of the point(s) where the density must be avalua
xi
a numeric vector of lenght d, or a matrix with d columns, representing the location parameter of the distribution; see Background. If xi is a matrix, its dimensions must agree with those of
Omega
a symmetric positive-definite matrix of dimension (d,d); see Section Background.
alpha
a numeric vector of length d which regulates the slant of the density; see Section Background. Inf values in alpha are not allowed.
nu
a positive value representing the degrees of freedom of ST distribution; does not need to be integer. Default value is nu=Inf which corresponds to the multivariate skew-normal distribution.
dp
a list with three elements named xi, Omega, alpha and nu, containing quantities as described above. If dp is specified, this prevents specification of the individual parameters.
n
a numeric value which represents the number of random vectors to be drawn; default value is 1.
log
logical (default value: FALSE); if TRUE, log-densities are returned.
...
additional parameters passed to pmt.

Value

  • A vector of density values (dmst and dmsc) or a single probability (pmst and pmsc) or a matrix of random points (rmst and rmsc).

Background

The family of multivariate ST distributions is an extension of the multivariate Student's $t$ family, via the introduction of a alpha parameter which regulates asymmetry; when alpha=0, the skew-$t$ distribution reduces to the commonly used form of multivariate Student's $t$. Further, location is regulated by xi and scale by Omega, when its diagonal terms are not all 1's. When nu=Inf the distribution reduces to the multivariate skew-normal one; see dmsn. Notice that the location vector xi does not represent the mean vector of the distribution (which in fact may not even exist if nu <= 1<="" code="">), and similarly Omega is not the covariance matrix of the distribution, although it is a covariance matrix. For additional information, see Section 6.2 of the reference below.

The family of multivariate SC distributions is the subset of the ST family, obtained when nu=1. While in the univariate case there are specialized functions for the SC distribution, dmsc, pmsc and rmsc simply make a call to dmst, pmst, rmst with argument nu set equal to 1.

Details

Typical usages are dmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, log=FALSE) dmst(x, dp=, log=FALSE) pmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, ...) pmst(x, dp=, ...) rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf) rmst(n=1, dp=) dmsc(x, xi=rep(0,length(alpha)), Omega, alpha, log=FALSE) dmsc(x, dp=, log=FALSE) pmsc(x, xi=rep(0,length(alpha)), Omega, alpha, ...) pmsc(x, dp=, ...) rmsc(n=1, xi=rep(0,length(alpha)), Omega, alpha) rmsc(n=1, dp=)

Function pmst requires dmt from package mnormt; the accuracy of its computation can be controlled via argument ....

References

Azzalini, A. with the collaboration of Capitanio, A. (2014). The Skew-Normal and Related Families. Cambridge University Press, IMS Monograph series.

See Also

dst, dsc, dmsn, dmt, makeSECdistr

Examples

Run this code
x <- seq(-4,4,length=15)
xi <- c(0.5, -1)
Omega <- diag(2)
Omega[2,1] <- Omega[1,2] <- 0.5
alpha <- c(2,2)
pdf <- dmst(cbind(x,2*x-1), xi, Omega, alpha, 5)
rnd <- rmst(10,  xi, Omega, alpha, 6)
p1 <- pmst(c(2,1), xi, Omega, alpha, nu=5)
p2 <- pmst(c(2,1), xi, Omega, alpha, nu=5, abseps=1e-12, maxpts=10000)

Run the code above in your browser using DataLab