The sn package provides facilities to define and manipulate
probability distributions of the skew-normal (SN) family and
some related ones, notably the skew-*t* (ST) family,
and to apply connected statistical methods for data fitting and
diagnostics, in the univariate and the multivariate case.

The first version of the package was written in 1997 (on CRAN since 1998); subsequent versions have evolved gradually up to version 0.4-18 in May 2013. In January 2014, version 1.0-0 has been uploaded to CRAN; this represented a substantial re-writing of the earlier ‘version 0.x’. Differences between the ‘version 0’ and the ‘version 1’ series are radical; they concern the core computational and graphical part as well as the user interface. Since version 1.0-0, the S4 protocol for classes and methods has been adopted.

Broadly speaking, the available tools can be divided in two groups: the
probability section and the statistics section. For a quick start, one
could look at their key functions, `makeSECdistr`

and
`selm`

, respectively, and from here explore the rest.
In the probability section, one finds also functions `dsn`

,
`dst`

, `dmsn`

and others alike; these functions
existed also in ‘version 0’ and their working is still very much
the same (not necessarily so their code).

The first instance of the ‘version 1’ series (that is, 1.0-0) has appeared at the same time when the companion book by Azzalini and Capitanio (2014) was published. Although the two projects are formally separate, they adopt the same notation, terminology and logical frame. This matching and the numerous references in the software documentation to specific sections of the book for background information should facilitate familiarizing with these tools.

Information on additional and on more recent change to the package is
provided in `NEWS`

file, accessible from the package documentation
index page.

A word of explanation is appropriate about the numerous references to Azzalini and Capitanio (2014) in the documentation of the package. The reason why the documentation often refers to the monograph rather than to the original research papers is because the book provides a relatively informal summary of material which has been elaborated in a number of technical papers, sometimes very technical or with information on the point of interest mixed with other material. In other words, the motivation behind this policy is readibility, not indulgence in self-citation. When one or a few original sources appeared to deliver the required information in a compact and accessible form, they have been cited directly. In any case, the quoted sections of the book include bibliographic notes which refer back to the original sources.

There is a partial backward compatibility of ‘version 1.x-y’ versus
‘version 0-4.18’.
Some functions of the older version would work as before
with virtually no change; a wider set arguments is now allowed. Functions
`dsn`

, `dst`

, `dmsn`

and alike fall in
this category: in some cases, the names of the arguments have been altered,
but they work as before if called with unnamed arguments; similar cases are
`msn.mle`

, `sn.cumulants`

and `T.Owen`

.
Notice, however, that `msn.mle`

and other fitting functions have
effectively been subsumed into the more comprehensive fitting function
`selm`

.

A second group of functions will work with little or even minimal changes.
Specific examples are functions `sn.mle`

and `st.mle`

which have
become `sn.mple`

and `st.mple`

, with some additional
arguments (again, one can achieve the same result via `selm`

).
Another example is constitude by the group of functions `dp.to.cp`

,
`cp.to.dp`

and `st.cumulants.inversion`

, which have been replaced
by the more general functions `dp2cp`

and `cp2dp`

;
one only needs to pay attention to conversion from 3rd and 4th order
cumulants to their standardized form in connection with the replacement of
`st.cumulants.inversion`

.

Finally, some functions are not there any longer, with no similarly-working
functions in the new version. This is the case of `sn.mle.grouped`

and `st.mle.grouped`

for maximum likelihood estimation from
grouped data, that is, data recorded as intervals and corresponding
frequencies.

**R** version 2.15-3 or higher, plus packages mnormt,
numDeriv, stats4 in addition to standard
packages (methods, graphics, etc.)

The command `citation("sn")`

indicates, among other information,
the running version of the package.
The most recent version of the package can be obtained from
the web page: http://azzalini.stat.unipd.it/SN
which also provides related material.

From the above-indicated web page, one can also obtain the package ‘sn0’ which is essentially the last ‘version 0’ (that is, 0.4-18) with suitable renaming of certain ingredients. This allows to have both the current and the old package installed at the same time.

Adelchi Azzalini.
Please send comments, error reports *et cetera* to the author,
whose web page is http://azzalini.stat.unipd.it/.

This package and its documentation are usable under the terms of the “GNU General Public License” version 3 or version 2, as you prefer; a copy of them is available from https://www.R-project.org/Licenses/.

While the software is freely usable, it would be appreciated
if a reference is inserted in publications or other work
which makes use of it. For the appropriate way of referencing it,
see the command `citation("sn")`

.

Azzalini, A. with the collaboration of Capitanio, A. (2014).
*The Skew-Normal and Related Families*.
Cambridge University Press, IMS Monographs series.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.