CoModescluster: Create an instance of the ['CoModesResults'] class

Description Usage Arguments Value Examples

View source: R/CoModes.R

Description

This function performs the model selection and the parameter inference. x, g, Gibbs_init=30, Gibbs_iter=min(4000,(ncol(x)*400)), burnin=min(ncol(x)*400,4000), EM_init=25, EM_tol=10^(-3), nbcores=Gibbs_init

Usage

1
2
3
CoModescluster(x, g, Gibbs_init = 30, Gibbs_iter = min(4000, (ncol(x) *
  400)), burnin = min(ncol(x) * 400, 4000), EM_init = 25,
  EM_tol = 10^(-3), nbcores = Gibbs_init)

Arguments

x

data.frame, where each column is a factor.

g

integer, defines the number of components.

Gibbs_init

integer, number of chains performed for model selection (default 30).

Gibbs_iter

integer, number of iterations of the MCMC algorithm for model selection (default min(ncol(x)*400,4000))

burnin

integer, number of iterations of the burn-in of the MCMC algorithm (default min(ncol(x)*400,4000))

EM_init

integer, number of runs of EM algorithm for parameter inference (default 25)

EM_tol

numeric, tolerance for the stopping criterion of the EM algorithm (default 0.001)

nbcores

number of cores used by the algorithm (only for Linux and MAC). (default Gibbs_init)

Value

Returns an instance of the [CoModesResults] class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Data Loading
data(alzheimer)
# Model selection and Parameter estimation for CMM with 2 components (8 MCMC chains are used for model selection)
results <- CoModescluster(alzheimer, 2, 8)
# Summary of the results
summary(results)
# Display the probabilities of the modes
barplot(results)

## End(Not run)

CoModes documentation built on May 2, 2019, 5:49 p.m.