4
Maximum likelihood estimation for skew-normal models
7
Fits a skew-normal (SN) distribution to data, or fits a linear regression
8
model with skew-normal errors, using maximum likelihood estimation.
11
sn.mle(X, y, cp, plot.it=TRUE, trace=FALSE, method="L-BFGS-B",
12
control=list(maxit=100))
16
a vector contaning the observed variable. This is the response
17
variable in case of linear regression.
18
Missing values (\code{NA}s) are not allowed.
21
a matrix of explanatory variables.
22
If \code{X} is missing, then a one-column matrix of all 1's is created.
23
If \code{X} is supplied, then it must include a column of 1's.
24
Missing values (\code{NA}s) are not allowed.
27
a vector of initial values for the centred parameters,
28
with \code{length(cp)=ncol(X)+2}
31
logical value, If \code{plot.it=TRUE} (default),
32
a plot of the nonparametric estimate of variable \code{y} (or the residuals,
33
in the case of regression), and the parametric fit is superimposed.
34
See below for details.
37
logical value which controls printing of the algorithm convergence.
38
If \code{trace=TRUE}, details are printed. Default value is \code{FALSE}.
41
this parameter is just passed to the optimizer \code{optim}; see the
42
documentation of this function for its usage. Default value is
45
this parameter is just passed to the optimizer \code{optim};
46
see the documentation of this function for its usage.
49
a list containing the following components:
52
a string containing the calling statement
55
a vector of length \code{ncol(X)+2} with the centred parameters
58
the log-likelihood at convergence
61
a vector of standard errors for the \code{cp} component
64
the observed information matrix for the \code{cp} component
67
the list returned by the optimizer \code{optim}; see the documentation
68
of this function for explanation of its components.
70
\section{Side Effects}{
71
If \code{plot.it=TRUE} and a graphical device is active, a plot is produced,
75
The optimizer \code{optim} is used, supplying the gradient of the log-likelihood.
76
Convergence is generally fast and reliable, but inspection of
77
the returned \code{message} from \code{optim} is always appropriate.
78
In suspect cases, re-run the function changing the starting \code{cp}
81
If plotting operates, the function \code{sm.density} of the package \code{sm}
82
is searched; this library is associated with the book by Bowman and
83
Azzalini (1997). If \code{sm.density} is not found, an histogram is plotted.
85
To fit a skew-normal distribution to grouped data by exact maximum likelihood
86
estimation, use \code{sn.mle.grouped}.
90
Background information on the SN distribution is given by Azzalini (1985).
91
See also Azzalini and Capitanio (1999), for an additional discussion of
92
the centred parametrization.
96
A class of distributions which includes the normal ones.
97
\emph{Scand. J. Statist.}
101
Azzalini, A. and Capitanio, A. (1999).
102
Statistical applications of the multivariate skew-normal distribution.
103
\emph{J.Roy.Statist.Soc. B}
107
Bowman, A.W. and Azzalini, A. (1997).
108
\emph{Applied Smoothing Techniques for Data Analysis:}
109
\emph{the Kernel Approach with S-Plus Illustrations.}
110
Oxford University Press, Oxford.
113
\code{\link{dsn}}, \code{\link{sn.em}}, \code{\link{msn.mle}},
114
\code{\link{optim}}, \code{\link{sn.mmle}}, \code{\link{sn.mle.grouped}}
117
data(ais, package="sn")
121
a<-sn.mle(X=cbind(1,lbm),y=bmi)
123
b<-sn.mle(X=model.matrix(~lbm+sex), y=bmi)
126
\keyword{distribution}