Package: fabMix 5.1

fabMix: Overfitting Bayesian Mixtures of Factor Analyzers with Parsimonious Covariance and Unknown Number of Components

Model-based clustering of multivariate continuous data using Bayesian mixtures of factor analyzers (Papastamoulis (2019) <doi:10.1007/s11222-019-09891-z> (2018) <doi:10.1016/j.csda.2018.03.007>). The number of clusters is estimated using overfitting mixture models (Rousseau and Mengersen (2011) <doi:10.1111/j.1467-9868.2011.00781.x>): suitable prior assumptions ensure that asymptotically the extra components will have zero posterior weight, therefore, the inference is based on the ``alive'' components. A Gibbs sampler is implemented in order to (approximately) sample from the posterior distribution of the overfitting mixture. A prior parallel tempering scheme is also available, which allows to run multiple parallel chains with different prior distributions on the mixture weights. These chains run in parallel and can swap states using a Metropolis-Hastings move. Eight different parameterizations give rise to parsimonious representations of the covariance per cluster (following Mc Nicholas and Murphy (2008) <doi:10.1007/s11222-008-9056-0>). The model parameterization and number of factors is selected according to the Bayesian Information Criterion. Identifiability issues related to label switching are dealt by post-processing the simulated output with the Equivalence Classes Representatives algorithm (Papastamoulis and Iliopoulos (2010) <doi:10.1198/jcgs.2010.09008>, Papastamoulis (2016) <doi:10.18637/jss.v069.c01>).

Authors:Panagiotis Papastamoulis [aut, cre]

fabMix_5.1.tar.gz
fabMix_5.1.zip(r-4.5)fabMix_5.1.zip(r-4.4)fabMix_5.1.zip(r-4.3)
fabMix_5.1.tgz(r-4.4-x86_64)fabMix_5.1.tgz(r-4.4-arm64)fabMix_5.1.tgz(r-4.3-x86_64)fabMix_5.1.tgz(r-4.3-arm64)
fabMix_5.1.tar.gz(r-4.5-noble)fabMix_5.1.tar.gz(r-4.4-noble)
fabMix_5.1.tgz(r-4.4-emscripten)fabMix_5.1.tgz(r-4.3-emscripten)
fabMix.pdf |fabMix.html
fabMix/json (API)

# Install 'fabMix' in R:
install.packages('fabMix', repos = c('https://mqbssppe.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/mqbssppe/overfittingfabmix/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:

On CRAN:

66 exports 0.49 score 41 dependencies 1 dependents 41 scripts 266 downloads

Last updated 7 months agofrom:0c031af817. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 10 2024
R-4.5-win-x86_64OKSep 10 2024
R-4.5-linux-x86_64OKSep 10 2024
R-4.4-win-x86_64OKSep 10 2024
R-4.4-mac-x86_64OKSep 10 2024
R-4.4-mac-aarch64OKSep 10 2024
R-4.3-win-x86_64OKSep 10 2024
R-4.3-mac-x86_64OKSep 10 2024
R-4.3-mac-aarch64OKSep 10 2024

Exports:complete.log.likelihoodcomplete.log.likelihood_q0complete.log.likelihood_q0_sameSigmacomplete.log.likelihood_Sjcompute_A_B_G_D_and_simulate_mu_Lambdacompute_A_B_G_D_and_simulate_mu_Lambda_CCUcompute_A_B_G_D_and_simulate_mu_Lambda_CUUcompute_A_B_G_D_and_simulate_mu_Lambda_q0compute_A_B_G_D_and_simulate_mu_Lambda_q0_sameSigmacompute_A_B_G_D_and_simulate_mu_Lambda_Sjcompute_sufficient_statisticscompute_sufficient_statistics_given_mucompute_sufficient_statistics_q0CorMat_mcmc_summaryCovMat_mcmc_summarydealWithLabelSwitchingfabMixfabMix_CxCfabMix_CxUfabMix_missing_valuesfabMix_parallelModelsfabMix_UxCfabMix_UxUgetStuffForDIClog_dirichlet_pdfmyDirichletobserved.log.likelihood0observed.log.likelihood0_q0_sameSigmaobserved.log.likelihood0_Sjobserved.log.likelihood0_Sj_q0overfitting_q0overfitting_q0_sameSigmaoverfittingMFAoverfittingMFA_CCCoverfittingMFA_CCUoverfittingMFA_CUCoverfittingMFA_CUUoverfittingMFA_missing_valuesoverfittingMFA_SjoverfittingMFA_Sj_missing_valuesoverfittingMFA_UCCoverfittingMFA_UUCplot.fabMix.objectprint.fabMix.objectreadLambdaValuessimDatasimData2summary.fabMix.objectupdate_all_yupdate_all_y_Sjupdate_OmegaINVupdate_OmegaINV_Cxxupdate_SigmaINV_fasterupdate_SigmaINV_faster_q0update_SigmaINV_faster_q0_sameSigmaupdate_SigmaINV_faster_Sjupdate_SigmaINV_xCCupdate_SigmaINV_xUCupdate_z_bupdate_z_b_Sjupdate_z_q0update_z_q0_sameSigmaupdate_z2update_z2_Sjupdate_z4update_z4_Sj

Dependencies:clicodacodetoolscolorspacecombinatcorrplotdoParallelfansifarverforeachggplot2gluegtableisobanditeratorslabel.switchinglabelinglatticelifecyclelpSolvemagrittrMASSMatrixmclustmgcvmunsellmvtnormnlmepillarpkgconfigR6RColorBrewerRcppRcppArmadillorlangscalestibbleutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Overfitting Bayesian Mixtures of Factor Analyzers with Parsimonious Covariance and Unknown Number of ComponentsfabMix-package
Complete log-likelihood function for xCx models.complete.log.likelihood
Complete log-likelihood function for xUx models and q=0complete.log.likelihood_q0
Complete log-likelihood function for xCx models and q=0complete.log.likelihood_q0_sameSigma
Complete log-likelihood function for xUx models.complete.log.likelihood_Sj
Computation and simulationscompute_A_B_G_D_and_simulate_mu_Lambda
Computation and simulations for CCUcompute_A_B_G_D_and_simulate_mu_Lambda_CCU
Computation and simulations for CUUcompute_A_B_G_D_and_simulate_mu_Lambda_CUU
Computation and simulations for q = 0.compute_A_B_G_D_and_simulate_mu_Lambda_q0
Computation and simulations for q = 0.compute_A_B_G_D_and_simulate_mu_Lambda_q0_sameSigma
Computation and simulationscompute_A_B_G_D_and_simulate_mu_Lambda_Sj
Compute sufficient statisticscompute_sufficient_statistics
Compute sufficient statistics given mucompute_sufficient_statistics_given_mu
Compute sufficient statistics for q = 0compute_sufficient_statistics_q0
Compute quantiles for the correlation matrix.CorMat_mcmc_summary
Compute quantiles for the covariance matrix.CovMat_mcmc_summary
Apply label switching algorithmsdealWithLabelSwitching
Main functionfabMix
Function to estimate the 'CUC' and 'CCC' modelsfabMix_CxC
Function to estimate the 'CCU' and 'CUU' modelsfabMix_CxU
Function to estimate the UUU or UCU models in case of missing valuesfabMix_missing_values
Function for model-level parallelizationfabMix_parallelModels
Function to estimate the 'UUC' and 'UCC' modelsfabMix_UxC
Function to estimate the 'UUU' and 'UCU' modelfabMix_UxU
Compute information criteriagetStuffForDIC
Log-density function of the Dirichlet distributionlog_dirichlet_pdf
Simulate from the Dirichlet distributionmyDirichlet
Log-likelihood of the mixture modelobserved.log.likelihood0
Log-likelihood of the mixture model for q=0 and same variance of errorsobserved.log.likelihood0_q0_sameSigma
Log-likelihood of the mixture modelobserved.log.likelihood0_Sj
Log-likelihood of the mixture model for q=0observed.log.likelihood0_Sj_q0
MCMC sampler for q=0overfitting_q0
MCMC sampler for q=0 and same error variance parameterizationoverfitting_q0_sameSigma
Basic MCMC sampler for the 'UCU' modeloverfittingMFA
Basic MCMC sampler for the 'CCC' modeloverfittingMFA_CCC
Basic MCMC sampler for the 'CCU' modeloverfittingMFA_CCU
Basic MCMC sampler for the 'CUC' modeloverfittingMFA_CUC
Basic MCMC sampler for the 'CUU' modeloverfittingMFA_CUU
Basic MCMC sampler for the case of missing dataoverfittingMFA_missing_values
Basic MCMC sampler for the 'UUU' modeloverfittingMFA_Sj
Basic MCMC sampler for the case of missing data and different error varianceoverfittingMFA_Sj_missing_values
Basic MCMC sampler for the 'UCC' modeloverfittingMFA_UCC
Basic MCMC sampler for the 'UUC' modeloverfittingMFA_UUC
Plot functionplot.fabMix.object
Print functionprint.fabMix.object
Read Lambda values.readLambdaValues
Synthetic data generatorsimData
Synthetic data generator 2simData2
Summary methodsummary.fabMix.object
Gibbs sampling for y in 'xCx' modelupdate_all_y
Gibbs sampling for y in 'xUx' modelupdate_all_y_Sj
Gibbs sampling for Omega^{-1}update_OmegaINV
Gibbs sampling for Omega^{-1} for Cxx modelupdate_OmegaINV_Cxx
Gibbs sampling for Sigma^{-1}update_SigmaINV_faster
Gibbs sampling for Sigma^{-1} per component for q=0update_SigmaINV_faster_q0
Gibbs sampling for Sigma^{-1} per component for q=0update_SigmaINV_faster_q0_sameSigma
Gibbs sampling for Sigma^{-1} per componentupdate_SigmaINV_faster_Sj
Gibbs sampling for Sigma^{-1} for xCC modelsupdate_SigmaINV_xCC
Gibbs sampling for Sigma^{-1} per component for xUC modelsupdate_SigmaINV_xUC
Gibbs sampling for zupdate_z_b
Gibbs sampling for zupdate_z_b_Sj
Gibbs sampling for z for q=0update_z_q0
Gibbs sampling for z for q=0update_z_q0_sameSigma
Collapsed Gibbs for z using matrix inversion lemmaupdate_z2
Collapsed Gibbs for z using matrix inversion lemmaupdate_z2_Sj
Collapsed Gibbs for zupdate_z4
Collapsed Gibbs for zupdate_z4_Sj
Wave datasetwaveDataset1500