mst.fit(X, y, freq, start, fixed.df=NA, plot.it=TRUE,
trace=FALSE, ...)
y
is a matrix, its rows refer to
observations, and its columns to components of the multivariate
distribution. If y
is a vector, it is converted to a one-column
matrix, and a scalar skew-t distribution iy
.y
.NA
(deafult value) if df is a parameter
to be estimated.beta
,Omega
, alpha
,
df
of the type described below. The dp
component of the returned
list from a previous call has the required format.trace=TRUE
, details are printed. Default value is FALSE
.mst.mle
; in practice, the start
parameter can be passed.beta
, Omega
, alpha
,
code{df}.
Here, beta
is a matrix of regression coefficients with
dim(beta)=c(nrow(X),ncol(y))
, Omega
is a covariance matrix of
order ncol(y)
, alpha
is a vector of shape parameters of length
ncol(y)
, code{df} is a positive scalar.dp
.beta
, alpha
, info
.
Here, beta
and alpha
are the standard errors for the
corresponding point estimates;
info
is the observed information matrix for the working parameter,
as explained below.optim
; see the documentation
of this function for explanation of its components.test
and p.value
, which are the value
of the likelihood ratio test statistic for normality (i.e. test that
all components of the shape parameter are 0), and the corresponding
p-value.(plot.it & missing(freq))=TRUE
and
a suitable device is active. Three plots are produced, and the programs
pauses between each two of them, waiting for the The first plot uses the variable y
if X
is missing, otherwise
it uses the residuals from the regression.
The form of this plot depends on the value of d=ncol(y)
;
if d=1
, an histogram is plotted with the fitted distribution
superimposed. If d>1
, a matrix of scatterplots is produced, with
superimposed the corresponding bivariate densities of the fitted
distribution.
The second plot has two panels, each representing a QQ-plot of Mahalanobis distances. The first of these refers to the fitting of a multivariate normal distribution, a standard statistical procedure; the second panel gives the corresponding QQ-plot of suitable Mahalanobis distances for the multivariate skew-normal fit.
The third plot is similar to the previous one, except that PP-plots are produced.
shape
parameter which regulates skewness; when shape=0
, the skew-t
distribution reduces to the usual t distribution.
When df=Inf
the distribution reduces to the multivariate skew-normal
one; see dmsn
. See the reference below for additional information.mst.fit
invokes mst.mle
which does the actual computational work;
then, mst.fit
displays the results in graphical form.
The documentation of mst.mle
gives details of the numerical
procedure for maximum likelihood estimation.msn.fit
, mst.mle
data(ais, package="sn")
attach(ais)
# a simple-sample case
b <- mst.fit(y=cbind(Ht,Wt))
#
# a regression case:
a <- mst.fit(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-6))
#
# refine the previous outcome
a1 <- mst.fit(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-9), start=a$dp)
Run the code above in your browser using DataLab