sampleM {NestedCategBayesImpute} | R Documentation |
Update individual level latent class indexes.
Description
Update individual level latent class indexes.
Usage
sampleM(phi, data, omega, G, serial, Parallel)
Arguments
phi |
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. |
data |
Input individual-level data. |
omega |
Matrix of the probabilities for the individual-level latent classes by the group-level latent classes. |
G |
Household-level latent class indexes. |
serial |
Vector containing the household index for each individual in the data. |
Parallel |
Logical indicator for running the function in parallel mode. |
Details
Function for obtaining a posterior sample of the individual-level latent class indexes for all individuals in the input data based on the corresponding full conditional distribution.
Value
A vector for the updated values of the individual-level latent class indexes for all individuals in the input data.
Author(s)
Quanli Wang