RunModel: Run the mcmc sampler for the model.

Description Usage Arguments Details Value Author(s)

Description

Run the mcmc sampler for the model.

Usage

1
2
3
RunModel(orig,mc,hyper,para,output,synindex,individual_variable_index,
    household_variable_index,HHhead_at_group_level,weight_option,struc_weight,MissData,
    Parallel)

Arguments

orig

A list object including all the necessary data variables needed by the sampler.; output of the initData function.

mc

A list specifying the number of mcmc iterations, burn-in, thinning and the effective sample size.

hyper

Hyper parameters for the prior distributions.

para

A list of the initial values of the parameters; output of the initParameters function.

output

A list of output parameters to be saved; output of the initOutput function.

synindex

A vector of iteration indexes for sampling synthetic data. length(synindex) is the number of synthetic data needed.

individual_variable_index

Vector of column indexes for the individual-level variables.

household_variable_index

Vector of column indexes for the group-level variables.

HHhead_at_group_level

Logical indicator for whether or not to move the household head to the household level. Set to TRUE to move the household head and FALSE otherwise.

weight_option

Logical indicator for whether or not to cap the number of impossible households to sample and re-weight the multinomial counts within each latent class back to the expected truth. Set to TRUE to use the weigthting option nd FALSE otherwise.

struc_weight

Vector specifying the weights to be used for each household size. The weights must be ordered by household sizes and no household must be excluded.

MissData

A list that stores all the info related to missing data. Default to NULL for no missing data.

Parallel

Logical indicator for running the function in parallel mode.

Details

This function runs the mcmc sampler for the NDPMPM model and generates posterior samples of parameters. It also generates synthetic data when needed.

Please note that:

Our example data set contains a sample of 2000 households and seven variables from the 2012 American Community Survey data. The variables are described below:

Subsequent data sets must follow this structure because of the predefined list of structural zeros or users can modify the list of structural zeros by downloading the package source, making changes only to the checkconstraints_imp.cpp file and re-building the package.

Value

synData

The list of synthetic data when the length(synindex) > 0.

output

The list of posterior samples for the parameters included in output.

Author(s)

Quanli Wang, Olanrewaju Akande


NestedCategBayesImpute documentation built on May 2, 2019, 3:26 p.m.