households#

Functions for generating households

Classes

Household

A class for individual households and methods to operate on each.

Functions

add_household

Add a household to the list of households.

assign_uids_by_homes

Assign IDs to everyone in order by their households.

generate_age_count

Generate a stochastic count of people for each age given the age distribution (age_distr) and number of people to generate (n).

generate_age_count_multinomial

Generate a stochastic count of people for each age given the age distribution (age_distr) and number of people to generate (n).

generate_all_households_fixed_ages

Generate the ages of those living in households together.

generate_all_households_infer_ages

Generate the ages of those living in households together.

generate_household_head_ages

Generate the head of household ages conditional on household size and the expected ages of people in the population.

generate_household_size_count_from_fixed_pop_size

Given a number of people and a household size distribution, generate the number of homes of each size needed to place everyone in a household.

generate_household_sizes

Create a list of the household sizes in random order so that as individuals are placed by age into homes running out of specific ages is not systemically an issue for any given household size unless certain sizes greatly outnumber households of other sizes.

generate_larger_households_fixed_ages

Assign people to households larger than one person (excluding special residences like long term care facilities or agricultural workers living in shared residential quarters).

generate_larger_households_infer_ages

Generate ages of those living in households of greater than one individual.

get_all_households

Get all households in a list, randomly assorted.

get_generated_household_size_distribution

Get household size distribution.

get_household

Return household with id: hhid.

get_household_head_ages_by_size

Calculate the count of households by size and the age of the head of the household, assuming the minimal household members id is the id of the head of the household.

get_household_heads

Get the id of the head of each household.

get_household_sizes

Get household sizes for each household in the popdict.

initialize_empty_households

Array of empty households.

populate_households

Populate all of the households.