Birth Module¶
This module simulates the process of new births in the synthetic population. It uses an estimated model to determine which households have a birth event in the current year, then adds new person records (babies) to the persons table with appropriate attributes. The module ensures unique person IDs, assigns demographic characteristics, and handles race assignment based on household composition.
Key features:
Applies a logit model to eligible households to predict births.
Adds new babies to the persons table with default and inferred attributes.
Assigns race based on household head or marks as “other” if ambiguous.
Ensures unique person IDs across the simulation.
Supports calibration of the birth model if configured.
Caveats:
Babies are always assigned relate=2 (child), age=0, and default values for other attributes.
Race assignment uses household head’s race if all members share the same race; otherwise, “other”.
Some attributes (e.g., race_id, race) may have duplication or missing values if not set in input data.
Most errors are silently handled; users should ensure input data is consistent.
Designed for use as-is; users should not override orca columns or internal logic.
Module function¶
Module configuration options: BirthModuleConfig
- demos.models.birth.birth(persons, households, get_new_person_id)[source]¶
Simulate household-level births and add new persons to the population.
This step applies the birth model to eligible households, determines which have a birth event, and adds new babies to the persons table with default and inferred attributes.
- Parameters:
persons (orca.Table) – The persons table containing individual-level attributes.
households (orca.Table) – The households table containing household-level attributes.
get_new_person_id (callable) – Function to generate new unique person IDs as needed.
- Return type:
None
Notes
Adds new rows to the persons table for each birth event.
Babies are assigned default values for most attributes.
Race is assigned based on household head if all members share the same race; otherwise, “other”.
Some attributes may be duplicated or missing if not set in input data.