Learn R Programming

sn (version 0.33)

mst.mle: Maximum likelihood estimation for a (multivariate) skew-t distribution

Description

Fits a skew-t (ST) or multivariate skew-t (MST) distribution to data, or fits a linear regression model with (multivariate) skew-t errors, using maximum likelihood estimation.

Usage

mst.mle(X, y, freq, start, fixed.df=NA, trace=FALSE,  method="BFGS", 
       control=list(iter.max=150) )

st.mle(X, y, freq, start, fixed.df=NA, trace=FALSE, method="BFGS", control=list(iter.max=150) )

Arguments

y
a matrix (for mst.mle) or a vector (for st.mle). If y is a matrix, rows refer to observations, and columns to components of the multivariate distribution.
X
a matrix of covariate values. If missing, a one-column matrix of 1's is created; otherwise, it must have the same number of rows of y. If X is supplied, then it must include a column of 1's.
freq
a vector of weights. If missing, a one-column matrix of 1's is created; otherwise it must have the same number of rows of y.
start
a list contaning the components beta,Omega, alpha, df of the type described below. The dp component of the returned list from a previous call has the required format and it can be used as a
fixed.df
a scalar value containing the degrees of freedom (df), if these must be taked as fixed, or NA (default value) if df is a parameter to be estimated.
trace
logical value which controls printing of the algorithm convergence. If trace=TRUE, details are printed. Default value is FALSE.
method
this parameter is just passed to the optimizer optim; see the documentation of this function for its usage. Default value is "BFGS".
control
this parameter is passed to the optimizer optim; see the documentation of this function for its usage.

Value

  • A list containing the following components:
  • calla string containing the calling statement.
  • dpa list containing the direct parameters beta, Omega, alpha. Here, beta is a matrix of regression coefficients with dim(beta)=c(ncol(X),ncol(y)), Omega is a covariance matrix of order ncol(y), alpha is a vector of shape parameters of length ncol(y). Notice that, if st.mle was called or equivalently mst.mle was called with y a vector, then Omega represents the square of the scale parameter.
  • sea list containing the components 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.
  • optimthe list returned by the optimizer optim; see the documentation of this function for explanation of its components.

Background

The family of multivariate skew-t distributions is an extension of the multivariate 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 the distribution reduces to the multivariate skew-normal one; see dmsn. See the reference below for additional information.

Details

If y is a vector and it is supplied to mst.mle, then it is converted to a one-column matrix, and a scalar skew-t distribution is fitted. This is the mechanism used by st.mle which is simply an interface to mst.mle.

The parameter freq is intended for use with grouped data, setting the values of y equal to the central values of the cells; in this case the resulting estimate is an approximation to the exact maximum likelihood estimate. If freq is not set, exact maximum likelihood estimation is performed.

References

Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t distribution. J.Roy. Statist. Soc. B 65, 367--389.

See Also

dmst,msn.mle,mst.fit, optim

Examples

Run this code
data(ais, package="sn")
attach(ais)
X.mat <- model.matrix(~lbm+sex)
b <- sn.mle(X.mat, bmi)
# 
b <- mst.mle(y=cbind(Ht,Wt))
#
# a multivariate regression case:
a <- mst.mle(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-6))
#
# refine the previous outcome
a1 <- mst.mle(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