# Package sn: overview

### Description

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.

### Development and basic facts

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 version of ‘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.

### Backward Compatibility of ‘version 1.x-y’

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`

) and
`dp.to.cp`

, which has been replaced by the more general function
`dp2cp`

.

Finally, some functions are not there any longer, with no similarly-working functions in the new version. The more prominent set of cases is represented by the functions for computing profile log-likelihoods. There is a long-term plan to re-instate similar facilities, possibly in a more flexible form, but not in the near future.

### Requirements

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

### Version

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 additional 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.

### Author

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

### Licence

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 http://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")`

.

### References

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