An S4 class to represent a Latent Class Analysis model
Such model can be used to cluster a data.frame \(X\) with several columns of factors with the following generative model :
$$\pi \sim \textrm{Dirichlet}(\alpha),$$
$$\forall k, \forall j, \quad \theta_{kj} \sim \textrm{Dirichlet}_{d_j}(\beta),$$
$$Z_i \sim \mathcal{M}_K(1,\pi),$$
$$\forall j=1, \ldots, p, \quad X_{ij}|Z_{ik}=1 \sim \mathcal{M}_{d_j}(1, \theta_{kj}),$$
These classes mainly store the prior parameters value (\(\alpha,\beta\)) of this generative model.
The Lca-class
must be used when fitting a simple Latent Class Analysis whereas the LcaPrior-class
must be used when fitting a MixedModels-class
.
LcaPrior(beta = 1)
Lca(alpha = 1, beta = 1)
Dirichlet prior parameter for all the categorical feature (default to 1)
Dirichlet prior parameter over the cluster proportions (default to 1)
a LcaPrior-class
object
a Lca-class
object
Lca-class
: Lca class constructor
LcaPrior
: LcaPrior class constructor
Lca
: Lca class constructor
beta
Dirichlet prior parameter for all the categorical feature (default to 1)
alpha
Dirichlet prior parameter over the cluster proportions (default to 1)
Other DlvmModels:
DcLbmPrior-class
,
DcSbmPrior-class
,
DiagGmmPrior-class
,
DlvmPrior-class
,
Gmm
,
MixedModels-class
,
MoMPrior-class
,
MoRPrior-class
,
MultSbmPrior-class
,
SbmPrior-class
,
greed()
LcaPrior()
#> An object of class "LcaPrior"
#> Slot "beta":
#> [1] 1
#>
LcaPrior(beta = 0.5)
#> An object of class "LcaPrior"
#> Slot "beta":
#> [1] 1
#>
Lca()
#> An object of class "Lca"
#> Slot "alpha":
#> [1] 1
#>
#> Slot "beta":
#> [1] 1
#>
Lca(beta = 0.5)
#> An object of class "Lca"
#> Slot "alpha":
#> [1] 1
#>
#> Slot "beta":
#> [1] 0.5
#>