msn.mle {sn}R Documentation

Maximum likelihood estimation for a multivariate skew-normal distribution

Description

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

Usage

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

Arguments

y a matrix or a vector. If y is a matrix, rows refer to observations, and columns to components of the multivariate distribution. If y is a vector, it is converted to a one-column matrix, and a scalar skew-normal distribution is fitted.
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.
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, of the type described below. The dp component of the returned list from a previous call has the required format.
trace logical value which controls printing of the algorithm convergence. If trace=TRUE, details are printed. Default value is F.
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.

Details

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.

The working parameter used in the maximization stage is c(beta,alpha/omega), since a profile `deviance' -2*loglikelihood for this parameter is actually used; see Azzalini and Capitanio (1999) for details. The optimizer optim is called, supplying the gradient of the profile deviance.

The function can take a vector y as input; however the use of sn.mle is recommended in the scalar case.

Value

A list containing the following components:

call a string containing the calling statement.
dp a list containing the direct parameters beta, Omega, alpha. 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).
se a 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.
optim the list returned by the optimizer optim; see the documentation of this function for explanation of its components.

Background

The multivariate skew-normal distribution is discussed by Azzalini and Dalla Valle (1996); the (Omega,alpha) parametrization adopted here is the one of Azzalini and Capitanio (1999).

References

Azzalini, A. and Dalla Valle, A. (1996). The multivariate skew-normal distribution. Biometrika 83, 715–726.

Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579–602.

See Also

dmsn,sn.mle,msn.fit, optim

Examples

data(ais)
attach(ais)
# a simple-sample case
b <- msn.mle(y=cbind(Ht,Wt))
#
# a regression case:
a <- msn.mle(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-6))
#
# refine the previous outcome
a1 <- msn.mle(X=cbind(1,Ht,Wt), y=bmi, control=list(x.tol=1e-9), start=a$dp)

[Package Contents]