Learn R Programming

sn (version 0.33)

msn.affine: Affine transformation a multivariate skew-normal or skew-t variable

Description

Computes the parameters of an affine transformation a+ A Y of a multivariate skew-normal or skew-t variable Y

Usage

msn.affine(dp, A, a=0, drop=TRUE)
  mst.affine(dp, A, a=0, drop=TRUE)

Arguments

dp
a list containg the pamaters of the variable being transformed; it must include components xi, Omega, alpha as described for dmsn; for mst.affine, also a component df
A
a matrix with ncol(A) equal to nrow(dp$Omega)
a
a vector wiht length(a) equal to nrow(dp$Omega)
drop
a logical flag (default value is TRUE) operating when nrow(A) equals 1. If these conditions are met, the output is provided in the form of parameters of a scalar distribution, dsn or dst, de

Value

  • A list containing the same components of the input parameter dp

Background

For background information about the skew-normal and skew-t distributions, their parameters and the properties of affine transformations, see the references below.

References

Azzalini, A. and Capitanio, A. (1999). Statistical applications of the multivariate skew-normal distribution. J.Roy.Statist.Soc. B 61, 579--602.

Azzalini, A. and Capitanio, A. (2003). Distributions generated by perturbation of symmetry with emphasis on a multivariate skew-t distribution. J.Roy. Statist. Soc. B 65, 367--389.

Capitanio, A. et al. (2003). Graphical models for skew-normal variates. Scand. J. Statist. 30, 129--144.

See Also

dsn, dst, dmsn, dmst

Examples

Run this code
dp<- list(xi=c(1,1,2), Omega=toeplitz(1/1:3), alpha=c(3,-1,2))
A <- matrix(c(1,-1,1,3,0,-2), 2, 3, byrow=TRUE) 
dp1 <- msn.affine(dp, A, 1:2)
#
dp$df <- 5
dp2<-  mst.affine(dp,A[1,,drop=FALSE])
dp3<-  mst.affine(dp,A[1,,drop=FALSE], drop=FALSE)
if(zapsmall(dp2$scale^2 - dp3$Omega)) print("something wrong here!")

Run the code above in your browser using DataLab