rmsal: Simulate from a Mixture of Multivariate SAL Distributions

Description Usage Arguments Value Author(s) References Examples

View source: R/rmsal.R

Description

Generates data from a mixture of multivariate shifted asymmetric Laplace (SAL) distributions.

Usage

1
rmsal(n, p, alpha, sig, mu, pi.g)

Arguments

n

The number of observations required.

p

The dimension of the data.

alpha

A matrix where each row specifies the direction of skewness in each variable for each mixture component.

sig

An array where each matrix specifies the covariance matrix for each mixture component.

mu

A matrix where each row gives the mean vector for each mixture component.

pi.g

A vector specifying the mixing components.

Value

An n by p + 1 matrix where each row corresponds to one observation from the specified mixture of SAL distributions. The first column gives the component (or group) label for each observation and columns 2 to p + 1 give the values of the p-dimensional observation.

Author(s)

Brian C. Franczak [aut, cre], Ryan P. Browne [aut, ctb], Paul D. McNicholas [aut, ctb]

Maintainer: Brian C. Franczak <[email protected]>

References

Franczak et. al (2014). Mixtures of Shifted Asymmetric Laplace Distributions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(6), 1149-1157.

Examples

1
2
3
4
5
6
7
8
alpha <- matrix(c(2,2,1,2),2,2)
sig <- array(NA,dim=c(2,2,2))
sig[,,1] <- diag(2)
sig[,,2] <- matrix(c(1,0.5,0.5,1),2,2)
mu <- matrix(c(0,0,-2,5),2,2)
pi.g <- rep(1/2,2)
x <- rmsal(n=500,p=2,alpha=alpha,sig=sig,mu=mu,pi.g=pi.g)
plot(x[,-1],col=x[,1],pch=x[,1])

MixSAL documentation built on May 18, 2018, 5:04 p.m.