4
Fitting multivariate skew-t distributions
7
Fits a multivariate skew-t (MST) distribution to data, or fits a
8
linear regression model with multivariate skew-t errors,
9
using maximum likelihood estimation. The outcome is then displayed
13
mst.fit(X, y, freq, start, fixed.df=NA, plot.it=TRUE, trace=FALSE, ...)
17
a matrix or a vector. If \code{y} is a matrix, its rows refer to
18
observations, and its columns to components of the multivariate
19
distribution. If \code{y} is a vector, it is converted to a one-column
20
matrix, and a scalar skew-t distribution is fitted.
23
a matrix of covariate values.
24
If missing, a one-column matrix of 1's is created; otherwise,
25
it must have the same number of rows of \code{y}.
29
If missing, a vector of 1's is created; otherwise
30
it must have the same number of rows of \code{y}.
33
a scalar value containing the degrees of freedom (df), if these must
34
be taken as fixed, or \code{NA} (default value) if df is a parameter
38
a list containing the components \code{beta},\code{Omega}, \code{alpha},
39
\code{df} of the type described below. The \code{dp} component of the returned
40
list from a previous call has the required format.
43
logical value which controls the graphical output (default=TRUE);
44
see below for description.
47
logical value which controls printing of the algorithm convergence.
48
If \code{trace=TRUE}, details are printed. Default value is \code{FALSE}.
51
additional parameters passed to \code{msn.mle}; in practice, the
52
\code{start}, the \code{algorithm} and the \code{control} parameters
56
A list containing the following components:
59
a string containing the calling statement.
62
a list containing the direct parameters \code{beta}, \code{Omega}, \code{alpha},
63
\code{df}. Here, \code{beta} is a matrix of regression coefficients with
64
\code{dim(beta)=c(nrow(X),ncol(y))}, \code{Omega} is a covariance matrix of
65
order \code{ncol(y)}, \code{alpha} is a vector of shape parameters of length
66
\code{ncol(y)}, \code{df} is a positive scalar.
69
log-likelihood evaluated at \code{dp}.
72
a list containing the components \code{beta}, \code{alpha}, \code{info}.
73
Here, \code{beta} and \code{alpha} are the standard errors for the
74
corresponding point estimates;
75
\code{info} is the observed information matrix for the working parameter,
79
see the documentation of \code{mst.mle} for its explanation
81
\item{test.normality}{
82
a list with elements \code{test} and \code{p.value}, which are the value
83
of the likelihood ratio test statistic for normality (i.e. test that
84
all components of the shape parameter are 0 and \code{df=Inf}),
85
and the corresponding p-value.
88
a list of with elements \code{distance}, \code{prob} and \code{df}, which are
89
the Mahalanobis distances of the residuals from the origin, with respect
90
to the metric associated to the matrix \code{Omega}, and the values
91
\code{prob} of the associated probabilities computed from the Snedecor's F
92
distribution with degrees of freedom given by the \code{df} vector of length
93
two, whose first component equals \code{ncol(y)} and the second component is
94
equal to the \code{df} parameter of fitted value ST distribution unless this
95
value has been selected by the used via \code{fixed.df}.
97
\section{Side Effects}{
98
Graphical output is produced if \code{(plot.it & missing(freq))==TRUE}.
99
Three plots are produced, and the programs pauses between each two of them,
100
waiting for the <Enter> key to be pressed.
102
The first plot uses the variable \code{y} if \code{X} is missing, otherwise
103
it uses the residuals from the regression.
104
The form of this plot depends on the value of \code{d=ncol(y)};
105
if \code{d=1}, an histogram is plotted with the fitted distribution
106
superimposed. If \code{d>1}, a matrix of scatter-plots is produced, with
107
superimposed the corresponding bivariate densities of the fitted
110
The second plot has two panels, each representing a QQ-plot of
111
Mahalanobis distances. The first of these refers to the fitting of a
112
multivariate normal distribution, a standard statistical procedure;
113
the second panel gives the corresponding QQ-plot of suitable Mahalanobis
114
distances for the multivariate skew-normal fit.
116
The third plot is similar to the previous one, except that PP-plots
120
For computing the maximum likelihood estimates, \code{mst.fit}
121
invokes \code{mst.mle}, while \code{mst.fit} displays the results
123
See the documentation of \code{mst.mle} for details of the numerical
124
procedure for maximum likelihood estimation.
127
This function may be removed in future versions of the package, and
128
(some of) its functionality transferred somewhere else
130
\section{Background}{
131
The family of multivariate skew-t distributions is an extension of the
132
multivariate Student's t family, via the introduction of a \code{shape}
133
parameter which regulates skewness; when \code{shape=0}, the skew-t
134
distribution reduces to the regular symmetric \emph{t}-distribution.
135
When \code{df=Inf} the distribution reduces to the multivariate skew-normal
136
one; see \code{dmsn}. See the reference below for additional information.
139
Azzalini, A. and Capitanio, A. (2003).
140
Distributions generated by perturbation of symmetry
141
with emphasis on a multivariate skew \emph{t} distribution.
142
\emph{J.Roy. Statist. Soc. B} \bold{65}, 367--389.
146
\code{\link{mst.mle}}, \code{\link{msn.fit}}, \code{\link{dmst}}, \code{\link{dmsn}}
149
data(ais, package="sn")
151
# a simple-sample case
152
b <- mst.fit(y=cbind(Ht,Wt))
155
a <- mst.fit(X=cbind(1,Ht,Wt), y=bmi)
157
# refine the previous outcome
158
a1 <- mst.fit(X=cbind(1,Ht,Wt), y=bmi, start=a$dp)
160
\keyword{distribution}