View source: R/USER_fit.FMMSNC.R
fit.FMMSNC  R Documentation 
It adjusts a finite mixture of censored and/or missing multivariate distributions (FMMC). These are the Skewnormal, normal and Studentt multivariate distributions. It uses a EMtype algorithm for iteratively computing maximum likelihood estimates of the parameters.
fit.FMMSNC(cc, LI, LS, y, mu = NULL, Sigma = NULL, shape = NULL, pii = NULL,
nu = NULL, g = NULL, get.init = TRUE, criteria = TRUE, family = "SN", error = 1e05,
iter.max = 350, uni.Gama = FALSE, kmeans.param = NULL, cal.im = FALSE)
cc 
vector of censoring indicators. For each observation it takes 0 if noncensored, 1 if censored. 
LI 
the matrix of lower limits of dimension 
LS 
the matrix of upper limits of dimension 
y 
the response matrix with dimension 
mu 
a list with 
Sigma 
a list with 
shape 
a list with 
pii 
a vector of weights for the mixture (dimension of the number 
nu 
the degrees of freedom for the Studentt distribution case, being a vector with dimension 
g 
number of mixture components. 
get.init 
Logical, 
criteria 
Logical, 
family 
distribution family to be used. Available distributions are the Skewnormal ("SN"), normal ("Normal") or Studentt ("t") distribution. 
error 
relative error for stopping criterion of the algorithm. See details. 
iter.max 
the maximum number of iterations of the EM algorithm. 
uni.Gama 
Logical, 
kmeans.param 
a list with alternative parameters for the kmeans function when generating initial values. List by default is

cal.im 
Logical, 
The information matrix is calculated with respect to the entries of
the square root matrix of Sigma, this using the Empirical information matrix. Disclaimer: User must be careful since the inference is asymptotic, so it must be used for decent sample sizes. Stopping criterion is abs((loglik/loglik1))<epsilon
.
It returns a list that depending of the case, it returns one or more of the following objects:
mu 
a list with 
Sigma 
a list with 
Gamma 
a list with 
shape 
a list with 
nu 
a vector with one element containing the value of the degreees of freedom 
pii 
a vector with 
Zij 
a 
yest 
a 
MI 
a list with the standard errors for all parameters. 
logLik 
the loglikelihood value for the estimated parameters. 
aic 
the AIC criterion value for the estimated parameters. 
bic 
the BIC criterion value for the estimated parameters. 
edc 
the EDC criterion value for the estimated parameters. 
iter 
number of iterations until the EM algorithm converges. 
group 
a 
time 
time in minutes until the EM algorithm converges. 
The uni.Gama
parameter refers to the \Gamma
matrix for the Skewnormal distribution, while for the normal and studentt distribution, this parameter refers to the \Sigma
matrix.
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
Cabral, C. R. B., Lachos, V. H., & Prates, M. O. (2012). Multivariate mixture modeling using skewnormal independent distributions. Computational Statistics & Data Analysis, 56(1), 126142.
Prates, M. O., Lachos, V. H., & Cabral, C. (2013). mixsmsn: Fitting finite mixture of scale mixture of skewnormal distributions. Journal of Statistical Software, 54(12), 120.
C.E. Galarza, L.A. Matos, D.K. Dey & V.H. Lachos. (2019) On Moments of Folded and Truncated Multivariate Extended SkewNormal Distributions. Technical report. ID 1914. 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 SkewNormal Distribution. echnical report. ID 1931. University of Connecticut.
rMSN
, rMMSN
and rMMSN.contour
mu < Sigma < shape < list()
mu[[1]] < c(3,4)
mu[[2]] < c(2,2)
Sigma[[1]] < matrix(c(3,1,1,4.5), 2,2)
Sigma[[2]] < matrix(c(2,1,1,3.5), 2,2)
shape[[1]] < c(2,2)
shape[[2]] < c(3,4)
nu < c(0,0)
pii < c(0.6,0.4)
percen < c(0.1,0.2)
n < 200
g < 2
seed < 654678
set.seed(seed)
test = rMMSN(n = n, pii = pii,mu = mu,Sigma = Sigma,shape = shape,
percen = percen, each = TRUE, family = "SN")
Zij < test$G
cc < test$cc
y < test$y
## left censoring ##
LI <cc
LS <cc
LI[cc==1]< Inf
LS[cc==1]< y[cc==1]
#full analysis may take a few seconds more...
test_fit.cc0 = fit.FMMSNC(cc, LI, LS, y, mu=mu,
Sigma = Sigma, shape=shape, pii = pii, g = 2, get.init = FALSE,
criteria = TRUE, family = "Normal", error = 0.0001,
iter.max = 200, uni.Gama = FALSE, cal.im = FALSE)
test_fit.cc = fit.FMMSNC(cc, LI, LS, y, mu=mu,
Sigma = Sigma, shape=shape, pii = pii, g = 2, get.init = FALSE,
criteria = TRUE, family = "SN", error = 0.00001,
iter.max = 350, uni.Gama = FALSE, cal.im = TRUE)
## missing data ##
pctmiss < 0.2 # 20% of missing data in the whole data
missing < matrix(runif(n*g), nrow = n) < pctmiss
y[missing] < NA
cc < matrix(nrow = n,ncol = g)
cc[missing] < 1
cc[!missing] < 0
LI < cc
LS <cc
LI[cc==1]< Inf
LS[cc==1]< +Inf
test_fit.mis = fit.FMMSNC(cc, LI, LS, y, mu=mu,
Sigma = Sigma, shape=shape, pii = pii, g = 2, get.init = FALSE,
criteria = TRUE, family = "SN", error = 0.00001,
iter.max = 350, uni.Gama = FALSE, cal.im = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.