SN {sn} | R Documentation |
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 has been written in 1997 (on CRAN since 1998); subsequent versions have evolved gradually up to version 0.4-18 in May 2013. The present ‘version 1’ of the package is a substantial re-writing of the earlier ‘version 0’. Differences between ‘version 0’ and ‘version 1’ concern the core computational and graphical part as well as the user interface. 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 upgrade to ‘version 1’ appears more or less at the time when the companion book by Azzalini and Capitanio (2014) is 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.
There is a partial backward compatibility of ‘version 1’ versus
‘version 0’. 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: typically, 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 general fitting function
selm
.
A second group of functions will work with little or even minimal changes.
Specific examples are functions sn.mle
and sn.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.
R version 2.15-3 or higher, plus packages mnormt, numDeriv, stats4 and methods in addition to ‘standard’ packages (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 WWW page: http://azzalini.stat.unipd.it/SN
which also contains other related material.
Adelchi Azzalini. Please send comments, error reports, etc. 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 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 this purpose, 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.