msn.mle(X, y, freq, start, trace=FALSE,
algorithm=c("nlminb", "Nelder-Mead", "BFGS", "CG", "SANN"),
control=list())
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 fy
.y
.beta
,Omega
, alpha
,
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
."nlminb"
, then this function is called; in all other cases,
optim
is called, witalgorithm
;
see the documentation of nlminb
or optim
for its usage.beta
, Omega
, alpha
,
where 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)
.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.nlminb
or optim
, plus an item with the name
of the selected
algorithm; see the documentation of either nlminb
or optim
for explanation of the other components.(Omega,alpha)
parametrization
adopted here is the one of Azzalini and Capitanio (1999).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, section 6.1) for details.
The selected optimizer (nlminb
or optim
) is called,
supplying the gradient of the profile deviance. In case the
optimizer is optim
), the gradient may or may not
be used, depending on which specific method has been selected.
The function can take a vector y
as input; however the use of
sn.mle
is recommended in the scalar case.
Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579--602.
dmsn
,msn.fit
, nlminb
,
optim
data(ais, package="sn")
attach(ais)
# a simple-sample case
a <- msn.mle(y=cbind(Ht,Wt))
#
# a regression case:
b <- msn.mle(X=cbind(1,Ht,Wt), y=ssf)
b1 <- msn.mle(X=cbind(1,Ht,Wt), y=ssf, algorithm="Nelder-Mead")
b2 <- msn.mle(X=cbind(1,Ht,Wt), y=ssf, start=b1$dp)
Run the code above in your browser using DataLab