Learn R Programming

NestedCategBayesImpute (version 1.2.1)

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

Description

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

Usage

checkconstraints_HHhead_at_group_level(data, neededpossiblehh, hh_size, parallel)

Arguments

data

A household data matrix generated by calling samplinghouseholds.

neededpossiblehh

The number of possible households needed before checking is stopped.

hh_size

The household size for the households in data.

parallel

Logical indicator for running the function in parallel mode.

Value

A list containing information on checking result.

outcome

An indicator vector for the possible/impossible household status under constraints.

Households

A data matrix for impossible households.

Index

A vector for the original indexes of households when possible households are found. Generally not to be used.

synHouseholds

A data matrix for possible households.

possible

The actual number of possible households returned.

Details

Given an input household data matrix, these functions will check the possible/impossible status of each household and also output the desired number of possible and impossible households separately. checkconstraints_HHhead_at_group_level checks contraints when the household head is moved to the household level. For the list of structural zeros currently included, see the documentation for checkconstraints.