fabMix_CxC: Function to estimate the 'CUC' and 'CCC' models

View source: R/fabMix.R

fabMix_CxCR Documentation

Function to estimate the CUC and CCC models

Description

This function runs parallel chains under a prior tempering scheme of the Dirichlet prior distribution of mixture weights.

Usage

fabMix_CxC(sameSigma, dirPriorAlphas, rawData, outDir, Kmax, mCycles, 
	burnCycles, g, h, alpha_sigma, beta_sigma, q, normalize,  
	thinning, zStart, nIterPerCycle, gibbs_z, 
	warm_up_overfitting, warm_up, overfittingInitialization, 
	progressGraphs, gwar, cccStart, lowerTriangular)

Arguments

sameSigma

Logical value denoting the parameterization of the error variance per component. If TRUE, the parameterization CCU is fitted. Otherwise, the parameterization CUU is fitted.

dirPriorAlphas

The prior Dirichlet parameters for each chain.

rawData

The observed data as an n\times p matrix. Clustering is performed on the rows of the matrix.

outDir

Name of the output folder.

Kmax

Number of components in the overfitted mixture. Default: 20.

mCycles

Number of MCMC cycles. Each cycle consists of nIterPerCycle MCMC iterations. At the end of each cycle a swap of the state of two randomly chosen adjacent chains is attempted.

burnCycles

Number of cycles that will be discarded as burn-in period.

g

Prior parameter g. Default value: g = 2.

h

Prior parameter h. Default value: h = 1.

alpha_sigma

Prior parameter \alpha. Default value: \alpha = 2.

beta_sigma

Prior parameter \beta. Default value: \beta = 1.

q

Number of factors q, where 1 \leq q \leq L. An error is thrown if the Ledermann bound (L) is exceeded.

normalize

Should the observed data be normalized? Default value: TRUE.

thinning

Optional integer denoting the thinning of the keeped MCMC cycles.

zStart

Optional starting value for the allocation vector.

nIterPerCycle

Number of iteration per MCMC cycle. Default value: 10.

gibbs_z

Select the gibbs sampling scheme for updating latent allocations of mixture model. Default value: 1.

warm_up_overfitting

Number of iterations for the overfitting initialization scheme. Default value: 100.

warm_up

Number of iterations that will be used to initialize the models before starting proposing switchings. Default value: 500.

overfittingInitialization

Logical value indicating whether the chains are initialized via the overfitting initialization scheme. Default: TRUE.

progressGraphs

Logical value indicating whether to plot successive states of the chains while the sampler runs. Default: FALSE.

gwar

Initialization parameter. Default: 0.05.

cccStart

Initialization from the CCC model.

lowerTriangular

logical value indicating whether a lower triangular parameterization should be imposed on the matrix of factor loadings (if TRUE) or not. Default: TRUE.

Value

List of files written to outDir

Note

It is recommended to always use: normalize = TRUE (default). Tuning of dirPriorAlphas may be necessary to achieve reasonable acceptance rates of chain swaps. Also note that the output is not identifiable due to label switching and the user has to subsequently call the dealWithLabelSwitching function. See the fabMix function for examples.

Author(s)

Panagiotis Papastamoulis

See Also

fabMix


fabMix documentation built on May 29, 2024, 2:53 a.m.