RprobitB_latent_classes {RprobitB} | R Documentation |
Create object of class RprobitB_latent_classes
Description
This function creates an object of class RprobitB_latent_classes
which
defines the number of latent classes and their updating scheme.
The RprobitB_latent_classes
object generated
by this function is only of relevance if the model possesses at least one
random coefficient, i.e. if P_r>0
.
Usage
RprobitB_latent_classes(latent_classes = NULL)
## S3 method for class 'RprobitB_latent_classes'
print(x, ...)
Arguments
latent_classes |
Either
|
Details
Why update latent classes?
In order not to have to specify the number of latent classes before estimation.
What options to update latent classes exist?
Currently two updating schemes are implemented, weight-based and via a Dirichlet process, see the vignette on modeling heterogeneity.
What is the default behavior?
One latent class without updates is specified per default. Print an
RprobitB_latent_classes
-object to see a summary of all relevant
(default) parameter settings.
Why is Cmax
required?
The implementation requires an upper bound on the number of latent classes
for saving the Gibbs samples. However, this is not a restriction since the
number of latent classes is bounded by the number of deciders in any case.
A plot method for visualizing the sequence of class numbers after estimation
and can be used to check if Cmax
was reached, see
plot.RprobitB_fit
.
Value
An object of class RprobitB_latent_classes
.
Examples
### default setting
RprobitB:::RprobitB_latent_classes()
### setting for a fixed number of two latent classes
RprobitB:::RprobitB_latent_classes(list(C = 2))
### setting for weight-based on Dirichlet process-based updates
RprobitB:::RprobitB_latent_classes(
list("weight_update" = TRUE, "dp_update" = TRUE)
)