Learn R Programming

NestedCategBayesImpute (version 1.2.1)

Modeling, Imputing and Generating Synthetic Versions of Nested Categorical Data in the Presence of Impossible Combinations

Description

This tool set provides a set of functions to fit the nested Dirichlet process mixture of products of multinomial distributions (NDPMPM) model for nested categorical household data in the presence of impossible combinations. It has direct applications in imputing missing values for and generating synthetic versions of nested household data.

Copy Link

Version

Install

install.packages('NestedCategBayesImpute')

Monthly Downloads

156

Version

1.2.1

License

GPL (>= 3)

Last Published

February 7th, 2019

Functions in NestedCategBayesImpute (1.2.1)

groupcount

Generate 2D count table for two integer-valued vectors.
GetImpossibleHouseholds

Generate the desired number of impossible households required to observe a given number of possible households.
initParameters

Initialize the model parameters for the MCMC.
initOutput

Set the output structure for saving posterior samples of parameters.
sampleG

Update household (group) level latent class indexes.
groupcount1D

Generate histogram count for an integer-valued vector.
sampleM

Update individual level latent class indexes.
RunModel

Run the mcmc sampler for the model.
households2individuals

Convert a household data matrix to the corresponding individual member data matrix.
UpdateBeta

Update beta.
UpdateLambda

Update lambda.
UpdateLambdaWeighted

Update lambda.
checkSZ2

Michael: Edit here
checkconstraints

Checking a data matrix of households for the possible/impossible status under a predefined set of structural zeros.
UpdateOmega

Update omega and v.
samplehouseholds

Rcpp implementation for sampling household data without constraints.
UpdatePiWeighted

Update pi and u.
checkSZ

The new implementation of checkconstraints and will evently replace checkconstraints.
initData

Initialize the input data structure.
initMissing

Initilize the misising data structure from input data
UpdateOmegaWeighted

Update omega and v.
UpdatePhi

Update phi.
checkconstraints_HHhead_at_group_level

Checking a data matrix of households for the possible/impossible status under a predefined set of structural zeros.
UpdatePhiWeighted

Update phi.
UpdatePi

Update pi and u.
SampleMissing

Sample and update missing data
UpdateAlpha

Update alpha.