MBGC: Mixture of bivariate gamma distributions clustering

Description Usage Arguments Value Examples

View source: R/MBGC.R

Description

Estimation using EM algorithm for mixture of bivariate gamma distributions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
MBGC(modelName = c("CC", "CI", "IC"), y, G, gating, data, maxit = 300,
  tol = 1e-05, initialization = "mclust", verbose = FALSE)

MBGC_CC(y, G, gating, data, maxit = 300, tol = 1e-05,
  initialization = "mclust", verbose = FALSE)

MBGC_CI(y, G, gating, data, maxit = 300, tol = 1e-05,
  initialization = "mclust", verbose = FALSE)

MBGC_IC(y, G, gating, data, maxit = 300, tol = 1e-05,
  initialization = "mclust", verbose = FALSE)

Arguments

modelName

A character string indicating which model to be fitted. Need to be one of "CC", "CI", "IC".

y

A vector of character strings indicating which variables in the data are treated as response or dependent variables.

G

An integer specifying the numbers of mixture components.

gating

Specifies the gating network in the MoE model, can be "C", "E" or a regression formula.

data

A matrix or data frame of observations. Categorical variables are allowed as covariates.

maxit

A parameter that controls the number of maximum iteration in the EM algorithm. The default is 100.

tol

A parameter that controls the convergence tolerance in the EM algorithm. The default is 1e-5.

initialization

Specifies initialization method for EM algorithm. The default is "mclust".

verbose

A logical controlling whether estimations in each EM iteration are shown in the fitting process. The default is TRUE.

Value

An object of class MBGC providing the estimation results. The details of the output components are:

modelName

A character string denoting the fitted expert model type.

gating

A character string denoting the fitted gating model type.

alpha1

The estimated alpha1 values.

alpha2

The estimated alpha2 values.

alpha3

The estimated alpha3 values.

beta

The estimated beta values.

gating.coef

The regression coefficients in the gating network, if a regression formula is provided in gating.

pro

A vector whose g-th component is the mixing proportion for the g-th component of the mixture model.

z

A matrix whose [i,g]-th entry is the probability that observation i in the data belongs to the g-th group.

class

The classification corresponding to z.

G

The number of mixture components.

loglike

The final estimated maximum log-likelihood value.

ll

The sequence of log-likelihood values in the EM algorithm fitting process.

df

Number of estimated parameters.

AIC

AIC values.

BIC

BIC values.

iter

Total iteration numbers.

formula

The formulas used in the regression.

gating.model

The final fitted regression model in gating network.

y

The input response data.

n

The number of observations in the data.

Hessian

The Hessian matrix at the estimated values

call

The matched call.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
clust1 <- MBGC(modelName = "CC", y=c("y1","y2"),
               G=2, gating = "C", data=gatingsim, verbose=FALSE)
clust1
clust2 <- MBGC(modelName = "CI", y=c("y1","y2"),
               G=2, gating = "C", data=gatingsim, verbose=FALSE)
clust2
clust3 <- MBGC(modelName = "IC", y=c("y1","y2"),
               G=2, gating = "C", data=gatingsim, verbose=FALSE)
clust3
clust4 <- MBGC(modelName = "CC", y=c("y1","y2"),
               G=2, gating = ~w1+w2+w3, data=gatingsim, verbose=FALSE)
clust4
clust5 <- MBGC(modelName = "CI", y=c("y1","y2"),
               G=2, gating = ~w1+w2+w3, data=gatingsim, verbose=FALSE)
clust5
clust6 <- MBGC(modelName = "IC", y=c("y1","y2"),
               G=2, gating = ~w1+w2+w3, data=gatingsim, verbose=FALSE)
clust6

senhu/mvClaim documentation built on Jan. 29, 2022, 3:18 p.m.