Density function, distribution function, quantiles and random number generation for the skew-normal (SN ) and the extended skew-normal (ESN ) distribution.
x: vector of quantiles. Missing values (NA's) and Inf's are allowed.
p: vector of probabilities. Missing values (NA's) are allowed
xi: vector of location parameters.
omega: vector of scale parameters; must be positive.
alpha: vector of slant parameter(s); +/- Inf is allowed. For psn, it must be of length 1 if engine="T.Owen". For qsn, it must be of length 1.
tau: a single value representing the hidden mean' parameter of the ESN distribution; tau=0` (default) corresponds to a SN distribution.
dp: a vector of length 3 (in the SN case) or 4 (in the ESN case), whose components represent the individual parameters described above. If dp
is specified, the individual parameters cannot be set.
n: a positive integer representing the sample size.
tol: a scalar value which regulates the accuracy of the result of qsn, measured on the probability scale.
log: logical flag used in dsn (default FALSE). When TRUE, the logarithm of the density values is returned.
engine: a character string which selects the computing engine; this is either "T.Owen" or "biv.nt.prob", the latter from package mnormt. If tau != 0 or length(alpha)>1, "biv.nt.prob" must be used. If this argument is missing, a default selection rule is applied.
solver: a character string which selects the numerical method used for solving the quantile equation; possible options are "NR" (default) and "RFB", described in the Details section.
...: additional parameters passed to T.Owen
Returns
density (dsn), probability (psn), quantile (qsn) or random sample (rsn) from the skew-normal distribution with given xi, omega and alpha parameters or from the extended skew-normal if tau!=0
In qsn, the choice solver="NR" selects the Newton-Raphson method for solving the quantile equation, while option solver="RFB"
alternates a step of regula falsi with one of bisection. The "NR" method is generally more efficient, but "RFB" is occasionally required in some problematic cases.
In version 1.6-2, the random number generation method for rsn has changed; the so-called transformation method (also referred to as the additive representation ) has been adopted for all values of tau. Also, the code has been modified so that there is this form of consistency: provided set.seed() is reset similarly before calls, code like rsn(5, dp=1:3) and rsn(10, dp=1:3), for instance, will start with the same initial values in the longer sequence as in the shorter sequence.
Background
The family of skew-normal distributions is an extension of the normal family, via the introdution of a alpha parameter which regulates asymmetry; when alpha=0, the skew-normal distribution reduces to the normal one. The density function of the SN distribution in the normalized case having xi=0 and omega=1 is 2ϕ(x)Φ(αx), if ϕ and Φ denote the standard normal density and distribution function. An early discussion of the skew-normal distribution is given by Azzalini (1985); see Section 3.3 for the ESN variant, up to a slight difference in the parameterization.
An updated exposition is provided in Chapter 2 of Azzalini and Capitanio (2014); the ESN variant is presented Section 2.2. See Section 2.3 for an historical account. A multivariate version of the distribution is examined in Chapter 5.
References
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scand. J. Statist. 12 , 171-178.
Azzalini, A. with the collaboration of Capitanio, A. (2014). The Skew-Normal and Related Families. Cambridge University Press, IMS Monographs series.