Learn R Programming

EMMIXuskew (version 0.11-6)

rfmmst: Simulation of Mixture Data

Description

Generate random sample from a specified mixture of unrestricted multivariate skew t distribution

Usage

rfmmst(g, n, mu, sigma, delta, dof = rep(10, g), 
    pro = rep(1/g, g), known = NULL)  
rmst(n, mu, sigma, delta, dof=1, known)

Arguments

g
a scalar specifying the number of components in the mixture model
n
either a positive integer specifying the total number of points to be generated or a vector (of length g) of positive integers specifying the number of points to be generated in each component.
mu
for rmst, this is a numeric vector of length p representing the location parameter; for rfmmst, this is list of g numeric matrices each having p rows and 1 column cont
sigma
for rmst, this is a numeric positive definite matrix with dimension (p,p) representing the scale parameter; for rfmmst, this is list of g numeric matrices containing the scale parameter for each com
delta
for rmst, this is a numeric vector of length p representing the skewness parameter; for rfmmst, this is list of g numeric matrices each having p rows and 1 column cont
dof
for rmst, this is a positive integer specifying the degrees of freedom; for rfmmst, this is numeric vector of length g representing the degrees of freedom for each component.
pro
the mixing proportions; for rmst, this is equal to 1; for rfmmst, this is vector of length of g specifying the mixing proportions for each component.
known
a list containing the parameters of the model. If specified, it overwrites the values of mu, sigma, delta, dof and pro.

Value

  • rmst returns an n by p numeric matrix of generated data. rfmmst returns an n by p+1 numeric matrix of genertaed data. The first p gives the coordinates of the generated data. The last column specifies which component each data point is generated from.

Details

rmst generates a sample n multivariate skew t (MST) variables. rfmmst generates a mixture of MST samples. Note that model parameters can be passed to rmst and rfmmst through the argument known or listed as individual arguments. If both methods of input were used, the parameters specified in known will be used.

References

Lee S, McLachlan G (2011). On the fitting of mixtures of multivariate skew t-distributions via the EM algorithm. arXiv:1109.4706 [stat.ME] Lee, S. and McLachlan, G.J. (2014) Finite mixtures of multivariate skew t-distributions: some recent and new results. Statistics and Computing, 24, 181-202. Lee, S. and McLachlan, G.J. (2013) EMMIXuskew: An R package for fitting mixtures of multivariate skew t-distributions via the EM algorithm. Journal of Statistical Software, 55(12), 1-22. URL http://www.jstatsoft.org/v55/i12/.

See Also

dmst, dfmmst

Examples

Run this code
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
rfmmst(1,500, c(1,2), diag(2), c(-1,1), 4, 1)
obj <- list()
obj$mu <- list(c(17,19), c(5,22), c(6,10))
obj$sigma <- list(diag(2), matrix(c(2,0,0,1),2), matrix(c(3,7,7,24),2))
obj$delta <- list(c(3,1.5), c(5,10), c(2,0))
obj$dof <- c(1, 2, 3)
obj$pro <- c(0.25, 0.25, 0.5)
rfmmst(3, 250, obj$mu, obj$sigma, obj$delta, obj$dof, obj$pro)
rfmmst(3, 500, known=obj)

Run the code above in your browser using DataLab