Type: Package
Title: Bayesian Model Selection Approach for Parsimonious Gaussian Mixture Models
Version: 1.1.1
Date: 2025-10-30
Depends: R(≥ 3.1.0)
Imports: methods (≥ 3.5.1), mcmcse (≥ 1.3-2), pgmm (≥ 1.2.3), mvtnorm (≥ 1.0-10), MASS (≥ 7.3-51.1), Rcpp (≥ 1.0.1), gtools (≥ 3.8.1), label.switching (≥ 1.8), fabMix (≥ 5.0), mclust (≥ 5.4.3)
Maintainer: Yaoxiang Li <yl814@georgetown.edu>
Description: Model-based clustering using Bayesian parsimonious Gaussian mixture models. MCMC (Markov chain Monte Carlo) are used for parameter estimation. The RJMCMC (Reversible-jump Markov chain Monte Carlo) is used for model selection. GREEN et al. (1995) <doi:10.1093/biomet/82.4.711>.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.2
Suggests: testthat
LinkingTo: Rcpp, RcppArmadillo
NeedsCompilation: yes
Packaged: 2025-10-30 15:15:50 UTC; Bach
Author: Yaoxiang Li [aut, cre], Xiang Lu [aut], Tanzy Love [aut]
Repository: CRAN
Date/Publication: 2025-10-30 15:40:02 UTC

CalculateProposalLambda

Description

CalculateProposalLambda

Usage

CalculateProposalLambda(hparam, thetaYList, CxyList, constraint, m, p, qVec)

Arguments

hparam

hparam

thetaYList

thetaYList

CxyList

CxyList

constraint

constraint

m

the number of clusters

p

the number of features

qVec

the vector of the number of factors in each clusters


CalculateProposalPsy

Description

CalculateProposalPsy

Usage

CalculateProposalPsy(hparam, thetaYList, CxyList, constraint, m, p, qVec)

Arguments

hparam

hparam

thetaYList

thetaYList

CxyList

CxyList

constraint

constraint

m

the number of clusters

p

the number of features

qVec

the vector of the number of factors in each clusters


EvaluateProposalLambda

Description

EvaluateProposalLambda

Usage

EvaluateProposalLambda(
  hparam,
  thetaYList,
  CxyList,
  constraint,
  newlambda,
  m,
  qVec,
  p
)

Arguments

hparam

hparam

thetaYList

thetaYList

CxyList

CxyList

constraint

constraint

newlambda

newlambda

m

the number of clusters

qVec

the vector of the number of factors in each clusters

p

the number of features


An S4 class to represent a Hyper parameter.

Description

An S4 class to represent a Hyper parameter.

Slots

alpha1

A numeric value

alpha2

A numeric value

delta

A numeric value

ggamma

A numeric value

bbeta

A numeric value


ThetaYList-class

Description

Definiton of ThetaYList parameter sets

Slots

tao

A numeric vector

psy

A list value

M

A list value

lambda

A list value

Y

A list value


generatePriorLambda

Description

evaluate prior value for parameter Lambda

Usage

generatePriorLambda(p, m, alpha2, qVec, psy, constraint)

Arguments

p

the number of features

m

the number of clusters

alpha2

hyper parameter

qVec

parameter

psy

parameter

constraint

parameter


generatePriorPsi

Description

generate prior value for parameter Psi

Usage

generatePriorPsi(p, m, delta, bbeta, constraint)

Arguments

p

the number of features

m

the number of clusters

delta

hyperparameters

bbeta

hyperparameters

constraint

the pgmm constraint, a vector of length three with binary entry. For example, c(1,1,1) means the fully constraint model


PriorThetaY list

Description

generate prior value for parameter Theta and Y.

Usage

generatePriorThetaY(m, n, p, muBar, hparam, qVec, ZOneDim, constraint)

Arguments

m

the number of cluster

n

sample size

p

number of covariates

muBar

parameter

hparam

hyperparameters

qVec

the vector of the number of factors in each clusters

ZOneDim

ZOneDim

constraint

constraint


bpgmm Model-Based Clustering Using Baysian PGMM Carries out model-based clustering using parsimonious Gaussian mixture models. MCMC are used for parameter estimation. The RJMCMC is used for model selection.

Description

bpgmm Model-Based Clustering Using Baysian PGMM Carries out model-based clustering using parsimonious Gaussian mixture models. MCMC are used for parameter estimation. The RJMCMC is used for model selection.

Usage

pgmmRJMCMC(
  X,
  mInit,
  mVec,
  qnew,
  delta = 2,
  ggamma = 2,
  burn = 20,
  niter = 1000,
  constraint = C(0, 0, 0),
  dVec = c(1, 1, 1),
  sVec = c(1, 1, 1),
  Mstep = 0,
  Vstep = 0,
  SCind = 0
)

Arguments

X

the observation matrix with size p * m

mInit

the number of initial clusters

mVec

the range of the number of clusters

qnew

the number of factor for a new cluster

delta

scaler hyperparameters

ggamma

scaler hyperparameters

burn

the number of burn in iterations

niter

the number of iterations

constraint

the pgmm initial constraint, a vector of length three with binary entry. For example, c(1,1,1) means the fully constraint model

dVec

a vector of hyperparameters with length three, shape parameters for alpha1, alpha2 and bbeta respectively

sVec

sVec a vector of hyperparameters with length three, rate parameters for alpha1, alpha2 and bbeta respectively

Mstep

the indicator of whether do model selection on the number of clusters

Vstep

the indicator of whether do model selection on variance structures

SCind

the indicator of whether use split/combine step in Mstep


stayMCMCupdate

Description

stayMCMCupdate

Usage

stayMCMCupdate(
  X,
  thetaYList,
  ZOneDim,
  hparam,
  qVec,
  qnew,
  dVec,
  sVec,
  constraint,
  clusInd
)

Arguments

X

X

thetaYList

thetaYList

ZOneDim

ZOneDim

hparam

hparam

qVec

qVec

qnew

qnew

dVec

dVec

sVec

sVec

constraint

constraint

clusInd

clusInd


summerizePgmmRJMCMC

Description

summerizePgmmRJMCMC

Usage

summerizePgmmRJMCMC(pgmmResList, trueCluster = NULL)

Arguments

pgmmResList

result list from pgmmRJMCMC

trueCluster

true cluster allocation


Title

Description

Title

Usage

toEthetaYlist(NEthetaYList, NEZOneDim, qnew, clusInd)

Arguments

NEthetaYList

NEthetaYList

NEZOneDim

NEZOneDim

qnew

qnew

clusInd

clusInd