rmmixcr: Random multivariate Finite Mixture Censored generator

Description Usage Arguments Author(s) See Also Examples

View source: R/functions.fm.mc.R

Description

Random generator of multivariate FM-SMSN distributions.

Usage

1
rmmixcr(n, pii, mu, Sigma, shape, nu, percCensu, family)

Arguments

n

number of observations

pii

a vector of weights for the mixture (dimension of the number g of clusters). Must sum to one!

mu

a list of g lists with each list containing the necessary parameters of the selected family

Sigma

a list of g arguments of matrices of initial values (dimension pxp) for the scale parameters.

shape

a list of g arguments of vectors of initial values (dimension p)for the skewness parameters.

nu

nu it's degrees of freedom.

percCensu

Matrix of censoring indicators. For each observation: 0 if non-censored, 1 if censored.

family

distribution family to be used in fitting ("t", "Skew.t", "Skew.slash", "Skew.normal", "Normal")

Author(s)

Luis Benites Sanchez lbenitesanchez@gmail.com, Victor Hugo Lachos hlachos@ime.unicamp.br, Edgar J. Lopez Moreno edgar.javier.lopez.moreno@gmail.com

See Also

smsn.mmix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
mu          <- Sigma <- shape <- family <- list()
mu[[1]]     <- c(-3,-1)
mu[[2]]     <- c(2,3)
Sigma[[1]]  <- matrix(c(8,1,1,5.5), 2,2)
Sigma[[2]]  <- matrix(c(2,1,1,2.5), 2,2)
family[[1]] <- "Skew.t"
family[[2]] <- "Skew.normal"
shape[[1]]  <- c(4,5)
shape[[2]]  <- c(1,1)
nu          <- c(3,3)
pii         <- c(0.65,0.35)
percCensu   <- c(0.15,0.15)

data        <- rmmixcr(100, pii , mu , Sigma, shape, nu, percCensu, family)

CensMixReg documentation built on May 2, 2019, 9:11 a.m.