Learn R Programming

sn (version 2.1.1)

makeSUNdistr: Build an object representing a SUN distribution

Description

Build an object which identifies a Unified Skew-Normal distribution (SUN) within this parametric family. The SUN family is essentially equivalent to some other parametric families examined in the literature, notably the Closed Skew-Normal.

Usage

makeSUNdistr(dp, name, compNames, HcompNames, drop = TRUE)

Value

An object of SUNdistr-class

Arguments

dp

a list of parameters as described at SUNdistr-base.

name

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

compNames

an optional vector of character strings with the names of the component variables; its length must be equal to the dimensionality d of the distribution being generated. If missing, the components are named "V1", "V2", ...

HcompNames

an optional vector of character strings with the names of the hidden component variables; its length must be equal to the dimensionality component m described in the ‘Details’. If missing, the components are named "H1", "H2", ...

drop

a logical value (default: TRUE) relevant only in the case m=1. When both m=1 and drop=TRUE, the returned object is of class either SECdistrUv or SECdistrMv, depending on the value of d, and family "SN" or "ESN", depending on the dp ingredients.

Author

Adelchi Azzalini

Details

The argument dp is a list, whose components are described at SUNdistr-base; see especially the ‘Details’ there. In this respect, there is no difference between the univariate and the univariate case, differently from the similar command makeSECdistr.

If the arguments name, compNames and HcompNames are missing, they are composed from the supplied arguments.

A SUNdistr-class object operates according to the S4 protocol.

See Also

Basic information on the SUN distribution SUNdistr-base, the description of the class SUNdistr-class,

Related methods: show.SUNdistr for displaying the object constituents, plot.SUNdistr for plotting, mean.SUNdistr for the mean value, vcov.SUNdistr for the variance matrix, summary.SUNdistr for various summary quantities

Functions SUNdistr-op manipulate objects created by this function, producing new SUNdistr-class objects

Examples

Run this code
xi <- c(1, 0, -1)
Omega <- matrix(c(2,1,1, 1,3,1, 1,1,4), 3, 3)
Delta <- matrix(c(0.72,0.20, 0.51,0.42, 0.88, 0.94), 3, 2, byrow=TRUE)
Gamma <- matrix(c(1, 0.8, 0.8, 1), 2, 2)
dp3 <- list(xi=xi, Omega=Omega, Delta=Delta, tau=c(-0.5, 0), Gamma=Gamma)
sun3 <- makeSUNdistr(dp=dp3, name="SUN3", compNames=c("x", "w", "z"))
show(sun3)

Run the code above in your browser using DataLab