~ubuntu-branches/ubuntu/trusty/r-cran-sn/trusty

« back to all changes in this revision

Viewing changes to man/dmst.Rd

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2014-01-14 06:28:00 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140114062800-yntgbps6kq5et10c
Tags: 1.0-0-1
* New upstream release

* debian/control: Add (Build-)Depends on r-cran-numderiv nomnormt (>= 1.3-1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%  file sn/man/dmst.Rd  
 
2
%  This file is a component of the package 'sn' for R
 
3
%  copyright (C) 2002-2013 Adelchi Azzalini
 
4
%---------------------
1
5
\name{dmst}
2
6
\alias{dmst}
3
7
\alias{pmst}
4
8
\alias{rmst}
5
 
\title{
6
 
Multivariate skew-\eqn{t} distribution
7
 
}
8
 
\description{
9
 
Probability density function, distribution function and random number 
10
 
generation for the multivariate skew-\eqn{t} (MST) distribution.
11
 
}
 
9
\alias{dmsc}
 
10
\alias{pmsc}
 
11
\alias{rmsc}
 
12
\title{Multivariate skew-\eqn{t} distribution and skew-Cauchy distribution}
 
13
 
 
14
\description{Probability density function, distribution function and random 
 
15
number generation for the multivariate skew-\eqn{t} (\acronym{ST}) and
 
16
skew-Cauchy (\acronym{SC}) distributions.}
 
17
 
12
18
\usage{
13
 
dmst(x, xi=rep(0,length(alpha)), Omega, alpha, df=Inf, dp = NULL, log=FALSE)
14
 
pmst(x, xi=rep(0,length(alpha)), Omega, alpha, df=Inf, dp = NULL, ...)
15
 
rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, df=Inf, dp = NULL)
 
19
dmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL, log=FALSE)
 
20
pmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL, ...)
 
21
rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, dp=NULL)
 
22
dmsc(x, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL, log=FALSE)
 
23
pmsc(x, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL, ...)
 
24
rmsc(n=1, xi=rep(0,length(alpha)), Omega, alpha, dp=NULL)
16
25
}
17
26
 
18
27
\arguments{
19
 
\item{x}{
20
 
for \code{dmst}, this is either a vector of length \code{d},
21
 
where \code{d=length(alpha)}, or a matrix with \code{d} columns, 
22
 
giving  the coordinates of the point(s) where the density must be 
23
 
avaluated; for \code{pmst}, only a vector of length \code{d} is allowed.
24
 
}
25
 
\item{xi}{
26
 
a numeric vector of lenght \code{d}, or a matrix with \code{d} columns,
27
 
representing the location parameter of the distribution; see Background.
28
 
If \code{xi} is a matrix, its dimensions must agree with those of \code{x}.
29
 
}
30
 
\item{Omega}{
31
 
a symmetric positive-definite matrix of dimension \code{(d,d)}; see Background.
32
 
}
33
 
\item{alpha}{
34
 
a numeric vector which regulates the shape of the density; see Background
35
 
}
36
 
\item{df}{
37
 
degrees of freedom (scalar); default is \code{df=Inf} which corresponds 
38
 
to the multivariate skew-normal distribution.
39
 
}
40
 
\item{dp}{
41
 
a list with three elements named \code{xi}, \code{Omega}, \code{alpha}
42
 
and \code{df}, containing quantities as described above. 
43
 
If \code{dp} is specified, this overrides the individual parameter 
44
 
specification. 
45
 
}
46
 
\item{n}{
47
 
a numeric value which represents the number of random vectors
48
 
to be drawn.
49
 
}
50
 
\item{log}{ 
51
 
logical (default value: \code{FALSE}); if TRUE, log-densities are returned.
52
 
}
53
 
\item{...}{
54
 
additional parameters passed to \code{pmt}
55
 
}}
56
 
\value{
57
 
A vector of density values (\code{dmst}) or a single probability 
58
 
(\code{pmst}) or a matrix of random  points (\code{rmst}).
59
 
}
 
28
 
 
29
 \item{x}{for \code{dmst} and \code{dmsc}, this is either a vector of length
 
30
  \code{d}, where \code{d=length(alpha)}, or a matrix with \code{d} columns,
 
31
  representing the coordinates of the point(s) where the density must be
 
32
  avaluated; for \code{pmst} and \code{pmsc}, only a vector of length
 
33
  \code{d} is allowed.}
 
34
 
 
35
 \item{xi}{a numeric vector of lenght \code{d}, or a matrix with \code{d}
 
36
  columns, representing the location parameter of the distribution; see
 
37
  \sQuote{Background}.  If \code{xi} is a matrix, its dimensions must agree
 
38
  with those of \code{x}.}
 
39
 
 
40
 \item{Omega}{a symmetric positive-definite matrix of dimension \code{(d,d)}; 
 
41
  see Section \sQuote{Background}.}
 
42
 
 
43
 \item{alpha}{a numeric vector of length \code{d} which regulates the slant
 
44
   of the density; see Section \sQuote{Background}.
 
45
   \code{Inf} values in \code{alpha} are not allowed.}
 
46
 
 
47
 \item{nu}{a positive value representing the degrees of freedom of
 
48
  \acronym{ST} distribution; default value is \code{nu=Inf} which corresponds
 
49
  to the multivariate skew-normal distribution.}
 
50
 
 
51
 \item{dp}{a list with three elements named \code{xi}, \code{Omega},
 
52
  \code{alpha} and \code{nu}, containing quantities as described above. If
 
53
  \code{dp} is specified, this prevents specification of the individual
 
54
  parameters.}
 
55
 
 
56
 \item{n}{a numeric value which represents the number of random vectors to be
 
57
  drawn; default value is \code{1}.}
 
58
 
 
59
 \item{log}{logical (default value: \code{FALSE}); if \code{TRUE},
 
60
  log-densities are returned.}
 
61
 
 
62
 \item{...}{additional parameters passed to \code{pmt}.}
 
63
 
 
64
}
 
65
 
 
66
\value{A vector of density values (\code{dmst} and \code{dmsc}) or a single
 
67
   probability (\code{pmst} and \code{pmsc}) or a matrix of random points
 
68
   (\code{rmst} and \code{rmst}).}
 
69
 
60
70
\details{Typical usages are
61
71
\preformatted{%
62
 
dmst(x, xi=rep(0,length(alpha)), Omega, alpha, df=Inf, log=FALSE)
 
72
dmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, log=FALSE)
63
73
dmst(x, dp=, log=FALSE)
64
 
pmst(x, xi=rep(0,length(alpha)), Omega, alpha, df=Inf, ...)
 
74
pmst(x, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf, ...)
65
75
pmst(x, dp=, ...)
66
 
rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, df=Inf)
 
76
rmst(n=1, xi=rep(0,length(alpha)), Omega, alpha, nu=Inf)
67
77
rmst(n=1, dp=)
 
78
dmsc(x, xi=rep(0,length(alpha)), Omega, alpha, log=FALSE)
 
79
dmsc(x, dp=, log=FALSE)
 
80
pmsc(x, xi=rep(0,length(alpha)), Omega, alpha, ...)
 
81
pmsc(x, dp=, ...)
 
82
rmsc(n=1, xi=rep(0,length(alpha)), Omega, alpha)
 
83
rmsc(n=1, dp=)
68
84
}
69
85
 
70
 
The positive-definiteness of \code{Omega} is not tested for efficiency
71
 
reasons. Function \code{pmst} requires \code{pmt} from package \code{mnormt};
72
 
the accuracy of its computation can be controlled via use of \code{...}
73
 
}
 
86
Function \code{pmst} requires \code{\link[mnormt]{dmt}} from package 
 
87
\pkg{mnormt}; the accuracy of its computation can be controlled via 
 
88
argument \code{\dots}.}
74
89
 
75
90
\section{Background}{
76
 
The family of multivariate skew-\eqn{t} distributions is an extension of the 
77
 
multivariate Student's \eqn{t} family, via the introduction of a \code{shape} 
78
 
parameter which regulates skewness; when \code{shape=0}, the skew-\eqn{t}
79
 
distribution reduces to the usual \eqn{t} distribution. 
80
 
When \code{df=Inf} the distribution reduces to the multivariate skew-normal 
 
91
The family of multivariate \acronym{ST} distributions is an extension of the 
 
92
multivariate Student's \eqn{t} family, via the introduction of a \code{alpha} 
 
93
parameter which regulates asymmetry; when \code{alpha=0}, the skew-\eqn{t}
 
94
distribution reduces to the commonly used form of multivariate Student's 
 
95
\eqn{t}.  Further,  location is regulated by \code{xi} and scale by 
 
96
\code{Omega}, when its diagonal terms are not all 1's.
 
97
When \code{nu=Inf} the distribution reduces to the multivariate skew-normal 
81
98
one; see \code{dmsn}. Notice that the location vector \code{xi}
82
99
does not represent the mean vector of the distribution (which in fact
83
 
may not even exist if \code{df <= 1}), and similarly
84
 
\code{Omega} is not \emph{the} covariance matrix of the distribution,
85
 
although it is \emph{a} covariance matrix. 
86
 
For additional information, see the reference below.
87
 
}
 
100
may not even exist if \code{nu <= 1}), and similarly \code{Omega} is not 
 
101
\emph{the} covariance matrix of the distribution, although it is \emph{a} 
 
102
covariance matrix. 
 
103
For additional information, see Section 6.2 of the reference below.
 
104
 
 
105
The family of multivariate \acronym{SC} distributions is the subset of the
 
106
\acronym{ST} family, obtained when \code{nu=1}. While in the univariate case
 
107
there are specialized functions for the \acronym{SC} distribution,
 
108
\code{dmsc}, \code{pmsc} and \code{rmsc} simply make a call to \code{dmst,
 
109
pmst, rmst} with argument \code{nu} set equal to 1.}
88
110
 
89
111
\references{
90
 
  Azzalini, A. and Capitanio, A. (2003).
91
 
  Distributions generated by perturbation of symmetry 
92
 
  with emphasis on a multivariate skew \emph{t} distribution.
93
 
  \emph{J.Roy. Statist. Soc. B} \bold{65}, 367--389.
 
112
%  Azzalini, A. and Capitanio, A. (2003).
 
113
%  Distributions generated by perturbation of symmetry 
 
114
%  with emphasis on a multivariate skew \emph{t} distribution.
 
115
%  \emph{J.Roy. Statist. Soc. B} \bold{65}, 367--389.
 
116
  
 
117
  Azzalini, A. with the collaboration of Capitanio, A. (2014). 
 
118
  \emph{The Skew-Normal and Related Families}. 
 
119
  Cambridge University Press, IMS Monograph series.
94
120
}
95
121
\seealso{
96
 
\code{\link{dst}},  \code{\link{dmsn}}, \code{\link[mnormt]{dmt}}
 
122
\code{\link{dst}},  \code{\link{dsc}}, \code{\link{dmsn}}, 
 
123
\code{\link[mnormt]{dmt}}, \code{\link{makeSECdistr}}
97
124
}
98
125
\examples{
99
126
x <- seq(-4,4,length=15)
101
128
Omega <- diag(2)
102
129
Omega[2,1] <- Omega[1,2] <- 0.5
103
130
alpha <- c(2,2)
104
 
pdf <- dmst(cbind(x,2*x-1), xi, Omega, alpha, df=5)
 
131
pdf <- dmst(cbind(x,2*x-1), xi, Omega, alpha, 5)
105
132
rnd <- rmst(10,  xi, Omega, alpha, 6)
106
 
p1 <- pmst(c(2,1), xi, Omega, alpha, df=5)
107
 
p2 <- pmst(c(2,1), xi, Omega, alpha, df=5, abseps=1e-12, maxpts=10000)
 
133
p1 <- pmst(c(2,1), xi, Omega, alpha, nu=5)
 
134
p2 <- pmst(c(2,1), xi, Omega, alpha, nu=5, abseps=1e-12, maxpts=10000)
108
135
}
109
136
\keyword{distribution}
110
137
\keyword{multivariate}