makeSECdistr: Build a skew-elliptically contoured distribution

View source: R/sn-funct.R

makeSECdistrR Documentation

Build a skew-elliptically contoured distribution

Description

Build an object which identifies a skew-elliptically contoured distribution (SEC), in the univariate and in the multivariate case. The term ‘skew-elliptical distribution’ is a synonym of SEC distribution.

Usage

makeSECdistr(dp, family, name, compNames)

Arguments

dp

a numeric vector (in the univariate case) or a list (in the multivariate case) of parameters which identify the specific distribution within the named family. See ‘Details’ for their expected structure.

family

a character string which identifies the parametric family; currently, possible values are: "SN", "ESN", "ST", "SC". See ‘Details’ for additional information.

name

an optional character string with the name of the distribution. If missing, one is created.

compNames

in the multivariate case, an optional vector of character strings with the names of the component variables; its length must be equal to the dimensionality of the distribution being generated. If missing and the first component of dp is a named vector, its names are used as compNames; otherwise the components are named "V1", "V2", ...

Details

If dp is a numeric vector, a univariate distribution is built. Alternatively, if dp is a list, a multivariate distribution is built. In both cases, the required number of components of dp depends on family: it must be 3 for "SN" and "SC"; it must be 4 for "ESN" and "ST".

In the univariate case, the first three components of dp represent what for the specific distributions are denoted xi (location), omega (scale, positive) and alpha (slant); see functions dsn, dst, dsc for their description. The fourth component, when it exists, represents either tau (hidden variable mean) for "ESN" or nu (degrees of freedom) for "ST". The names of the individual parameters are attached to the components of dp in the returned object.

In the multivariate case, dp is a list with components having similar role as in the univariate case, but xi=dp[[1]] and alpha=dp[[3]] are now vectors and the scale parameter Omega=dp[[2]] is a symmetric positive-definite matrix. For a multivariate distribution of dimension 1 (which can be created, although a warning message is issued), Omega corresponds to the square of omega in the univariate case. Vectors xi and alpha must be of length ncol(Omega). See also functions dmsn, dmst and dmsc. The fourth component, when it exists, is a scalar with the same role as in the univariate case.

In the univariate case alpha=Inf is allowed, but in the multivariate case all components of the vector alpha must be finite.

An object built by this function operates according to the S4 protocol.

Value

In the univariate case, an object of class SECdistrUv; in the multivariate case, an object of class SECdistrMv. See SECdistrUv-class and SECdistrMv-class for their description.

Background

For background information, see Azzalini and Capitanio (2014), specifically Chapters 2 and 4 for univariate cases, Chapters 5 and 6 for multivariate cases; Section 6.1 provides a general formulation of SEC distributions.

If the slant parameter alpha is 0 (or a vector of 0's, in the multivariate case), the distribution is of classical elliptical type.

The ESN distribution is included here as a members of the SEC class, with a very slight extension of the original definition of this class, since the only difference is the non-zero truncation point of the unobserved component of the (d+1)-dimensional EC variable.

Author(s)

Adelchi Azzalini

References

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

See Also

The description of classes SECdistrUv-class and SECdistrMv-class

plot.SECdistr for plotting and summary.SECdistr for summaries

Related functions dsn, dst, dsc, dmsn, dmst, dp2cp

Functions affineTransSECdistr and conditionalSECdistr to manipulate objects of class SECdistrMv-class

Function extractSECdistr to extract objects of class SECdistrMv-class and SECdistrUv-class representing the SEC distribution of a selm fit

Examples

    
f1 <- makeSECdistr(dp=c(3,2,5), family="SN", name="First-SN")
show(f1)
summary(f1)
plot(f1)
plot(f1, probs=c(0.1, 0.9))
#
f2 <- makeSECdistr(dp=c(3, 5, -4, 8), family="ST", name="First-ST")
f9 <- makeSECdistr(dp=c(5, 1, Inf, 0.5), family="ESN", name="ESN,alpha=Inf")
#
dp0 <- list(xi=1:2, Omega=diag(3:4), alpha=c(3, -5))
f10 <- makeSECdistr(dp=dp0, family="SN", name="SN-2d", compNames=c("u1", "u2"))
#
dp1 <- list(xi=1:2, Omega=diag(1:2)+outer(c(3,3),c(2,2)), alpha=c(-3, 5), nu=6)
f11 <- makeSECdistr(dp=dp1, family="ST", name="ST-2d", compNames=c("t1", "t2"))

sn documentation built on April 5, 2023, 5:15 p.m.