Given model parameters, generate the desired number of impossible households required to observe a given number of possible households. Also generate synthetic (and valid) data of the same size as the observed data when required.
GetImpossibleHouseholds(d, n_star_h, lambda, omega, phi, pi, blocksize, n, synindex,
HHhead_at_group_level,Parallel)
Vector containing the number of levels for each individual-level variable.
Vector containing the number of observed households for the different household sizes in the original data.
Multinomial probabilities for each group-level variable.
Latent class probabilities for the group-level and individual-level latent class pairs.
Multinomial probabilities for each individual-level variable by each pair of group-level and individual-level latent classes.
Latent class probabilities for the group-level latent classes.
Number of households to be generated at a time; batch sampling is used to improve computing speed.
Number of households in the original input data and the sum of n_star_h
.
Logical indicator for sampling synthetic data. Set to TRUE when synthetic data is needed.
Logical indicator for data structure with respect to the household head. Set to TRUE if the household head has been moved to the household level and FALSE otherwise.
Logical indicator for running the function in parallel mode.
A data matrix containing both the group-level (in long format) and individual-level latent classes for the impossible households.
A vector containing the group-level latent classes for the impossible households.
A data matrix containing the individual-level data for the impossible households.
A data matrix containing the group-level data for the impossible households.
A vector for the number of impossible households for the different household sizes.
Synthetic data when synindex is TRUE. NULL otherwise.