Update household (group) level latent class indexes.
sampleG(phi, data, omega, pi, ni, HHdata, lambda, Parallel)
Matrix of posterior samples for the individual-level probabilities for each individual-level variable by each pair of group-level and individual-level latent classes.
Individual level data.
Matrix of the probabilities for the individual-level latent classes by the group-level latent classes.
Vector of the probabilities for the group-level latent classes.
Vector containing the number of individuals in each household in the data..
Household level data.
A list of matrices of the group-level probabilities for each group-level variable by the group-level latent classes. Each matrix in the list is for each group-level variable.
Logical indicator for running the function in parallel mode.
A list with two variables.
A vector for the updated values of the household-level latent class indexes for all households in the input data.
The vector G
expanded to a long format to match the number of individuals in data
.
Function for obtaining a posterior sample of the household-level latent class indexes for all households in the input data based on the corresponding full conditional distribution.