View source: R/model_fitting.R
RprobitB_latent_classes | R Documentation |
RprobitB_latent_classes
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
.
RprobitB_latent_classes(latent_classes = NULL)
## S3 method for class 'RprobitB_latent_classes'
print(x, ...)
latent_classes |
Either
|
In order not to have to specify the number of latent classes before estimation.
Currently two updating schemes are implemented, weight-based and via a Dirichlet process, see the vignette on modeling heterogeneity.
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.
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
.
An object of class RprobitB_latent_classes
.
### 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)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.