mvst (version 1.0.1)

rmvSE: Random generation from a SE distribution.

Description

This function generates draws from a p-variate Skew-Elliptical distribution.

Usage

rmvSE(n, p, modelType, theta, seed=NULL)

Arguments

n

number of draws.

p

dimension of the drawn vectors.

modelType

generating distribution. Already implemented modelTypes are 'N' (Normal), 'SN' (skew-normal), 'T' (Student T), and 'ST' (skew-t).

theta

list of parameters. The list should contains elements named 'xi' (numeric), 'G' (pxp matrix), 'psi' (numeric, optional) and 'nu' (scalar, optional).

seed

(optional) value of the random number generator seed.

Value

A list with three elements

  • y n x p matrix of the random draws from a p-variate SE distribution.

  • z vector of the latent values z (NULL for symmetric models)

  • v vector of the latent values v (NULL for the N and SN models)

References

Azzalini, Capitanio - Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t distribution - JRSSB - 2003 (see eq. 25).

See Also

cmlSE, mcSE.

Examples

Run this code
# NOT RUN {
## Set n, p and the parameter values
theta = list(xi=c(3,5), psi=c(2,4), G=diag(2), nu=6)
n = 1000
p = 2
## Generate the data
X = rmvSE(n, p, 'ST', theta, seed=NULL)
## X contains the data matrix and the vectors z and v of latent variables:
y = X$y
z = X$z
v = X$v
# }

Run the code above in your browser using DataCamp Workspace