rMMSN: Random Generator of Finite Mixture of Multivariate...

View source: R/USER_rMMSN.R

rMMSNR Documentation

Random Generator of Finite Mixture of Multivariate Distributions.

Description

It generates random realizations following a multivariate finite mixture of Skew-normal (family == "SN") and normal (family == "Normal") distributions under censoring. Censoring level can be set as a percentage and it can be adjusted per group if desired.

Usage

rMMSN(n = NULL, mu = NULL, Sigma = NULL, shape = NULL, percent = NULL,
each = FALSE, pii = NULL, family = "SN")

Arguments

n

number of observations

mu

a list with g entries, where each entry represents location parameter per group, being a vector of dimension p.

Sigma

a list with g entries, where each entry represents a scale parameter per group, a matrix with dimension pxp.

shape

a list with g entries, where each entry represents a skewness parameter, being a vector of dimension p.

percent

Percentage of censored data in each group or data as a whole (see next item).

each

If each == TRUE, the data will be censored in each group, where percent must be a vector of dimension p. Besides, if each == FALSE (by default), the data will be censored in the whole set, then percent must be a vector of dimension 1.

pii

a vector of weights for the mixture of dimension g, the number of clusters. It must sum to one!

family

distribution family to be used for fitting. Options are "SN" for the Skew-normal and "Normal" for the Normal distribution respectively.

Value

It returns a list that depending of the case, it returns one or more of the following objects:

y

a n x p matrix containing the generated random realizations.

G

a vector of length n containing the group classification per subject.

cutoff

a vector containing the censoring cutoffs per group.

Author(s)

Francisco H. C. de Alencar hildemardealencar@gmail.com, Christian E. Galarza cgalarza88@gmail.com, Victor Hugo Lachos hlachos@uconn.edu and Larissa A. Matos larissam@ime.unicamp.br

Maintainer: Francisco H. C. de Alencar hildemardealencar@gmail.com

References

Cabral, C. R. B., Lachos, V. H., & Prates, M. O. (2012). Multivariate mixture modeling using skew-normal independent distributions. Computational Statistics & Data Analysis, 56(1), 126-142.

Prates, M. O., Lachos, V. H., & Cabral, C. (2013). mixsmsn: Fitting finite mixture of scale mixture of skew-normal distributions. Journal of Statistical Software, 54(12), 1-20.

C.E. Galarza, L.A. Matos, D.K. Dey & V.H. Lachos. (2019) On Moments of Folded and Truncated Multivariate Extended Skew-Normal Distributions. Technical report. ID 19-14. University of Connecticut.

F.H.C. de Alencar, C.E. Galarza, L.A. Matos & V.H. Lachos. (2019) Finite Mixture Modeling of Censored and Missing Data Using the Multivariate Skew-Normal Distribution. echnical report. ID 19-31. University of Connecticut.

See Also

fit.FMMSNC, rMSN and rMMSN.contour

Examples

mu <- Sigma <- shape <- list()
mu[[1]]     <- c(-3,-4)
mu[[2]]     <- c(2,2)
shape[[1]]  <- c(-2,2)
shape[[2]]  <- c(-3,4)
Sigma[[1]]  <- matrix(c(3,1,1,4.5), 2,2)
Sigma[[2]]  <- matrix(c(2,1,1,3.5), 2,2)
pii         <- c(0.6,0.4)
percent   <- c(0.1,0.1)
family <- "SN"
n <-100

set.seed(20)
rMMSN(n = n,pii = pii, mu = mu, Sigma = Sigma, shape = shape,
percent = percent, each = TRUE, family = family)


CensMFM documentation built on May 29, 2024, 1:48 a.m.