Skip to content

Control Variables

JiaXu1024 edited this page Nov 17, 2026 · 3 revisions

Control Variables Reference

Complete reference for the control variables and reporting measures used in SANDAG PopulationSim.

Overview

Fitting controls are demographic totals that PopulationSim matches during synthesis. This page also documents reporting measures, which are evaluated but do not constrain synthesis. Each fitting control has:

  • Target: Household (household) or Person (person)
  • Geography: Where control is applied (region, puma, or mgra)
  • Importance: Weight for balancing (higher = more precise matching)
  • Expression: Seed-data field logic for classification
  • Description: Human-readable explanation

Fitting Control Counts

Target group Fitting controls
Household 16
Person 38
Total 54

The two children-presence measures are reporting-only and are listed separately below. Fitting-control definitions and importance values come from controls.csv; reporting measures come from reporting_controls.csv.

Household Controls (16 total)

Total Households

Control Name Geography Importance Expression Description
Total_HH mgra 1,000,000,000 (households.WGTP > 0) & (households.WGTP < np.inf) Total households

Household Size

Control Name Geography Importance Expression Description
HHSize_1 mgra 250,000 households.NP == 1 Single-person households
HHSize_2 mgra 250,000 households.NP == 2 Two-person households
HHSize_3 mgra 250,000 households.NP == 3 Three-person households
HHSize_4Plus mgra 250,000 households.NP >= 4 Households with 4 or more persons

Sum constraint: HHSize_1 + HHSize_2 + HHSize_3 + HHSize_4Plus = Total_HH

Household Income

Control Name Geography Importance Expression Description
HHInc_0to14999 mgra 100,000 (households.HHADJINC >= 0) & (households.HHADJINC <= 14999) Income: $0-$14,999
HHInc_15000to29999 mgra 100,000 (households.HHADJINC >= 15000) & (households.HHADJINC <= 29999) Income: $15,000-$29,999
HHInc_30000to59999 mgra 100,000 (households.HHADJINC >= 30000) & (households.HHADJINC <= 59999) Income: $30,000-$59,999
HHInc_60000to99999 mgra 100,000 (households.HHADJINC >= 60000) & (households.HHADJINC <= 99999) Income: $60,000-$99,999
HHInc_100000to149999 mgra 100,000 (households.HHADJINC >= 100000) & (households.HHADJINC <= 149999) Income: $100,000-$149,999
HHInc_150000to199999 mgra 100,000 (households.HHADJINC >= 150000) & (households.HHADJINC <= 199999) Income: $150,000-$199,999
HHInc_200000Plus mgra 100,000 (households.HHADJINC >= 200000) & (households.HHADJINC <= np.inf) Income: $200,000 or more

Variable: HHADJINC = Adjusted household income (inflation-adjusted to ACS year)

Workers per Household

Control Name Geography Importance Expression Description
HHWork_0 mgra 100,000 households.workers == 0 Zero-worker households
HHWork_1 mgra 100,000 households.workers == 1 One-worker households
HHWork_2 mgra 100,000 households.workers == 2 Two-worker households
HHWork_3Plus mgra 100,000 households.workers >= 3 Households with three or more workers

Variable: workers = Derived from person-level ESR (employment status) within household

Children Presence (2 reporting measures)

Measure Geography Seed table Population Expression Description
HHChild_0 mgra households households households.HUPAC == 4 No children present
HHChild_1Plus mgra households households (households.HUPAC == 1) | (households.HUPAC == 2) | (households.HUPAC == 3) One or more children present

These measures are defined in reporting_controls.csv and are not fitting controls; PopulationSim does not use them to balance household weights. The reporting configuration specifies HUPAC as the source field and the households population.

Variable: HUPAC = HH presence and age of children

  • 1 = With children under 6 only
  • 2 = With children 6-17 only
  • 3 = With children under 6 and 6-17
  • 4 = No children

Person Controls (38 total)

Sex

Control Name Geography Importance Expression Description
Male mgra 1,000,000 persons.SEX == 1 Male persons
Female mgra 1,000,000 persons.SEX == 2 Female persons

Sum constraint: Male + Female = Total Population (household + GQ)

Age (12 controls)

Control Name Geography Importance Expression Description
Age_LT5 mgra 100,000 (persons.AGEP >= 0) & (persons.AGEP <= 4) Age 0-4 years
Age_5to9 mgra 100,000 (persons.AGEP >= 5) & (persons.AGEP <= 9) Age 5-9 years
Age_10to14 mgra 100,000 (persons.AGEP >= 10) & (persons.AGEP <= 14) Age 10-14 years
Age_15to17 mgra 100,000 (persons.AGEP >= 15) & (persons.AGEP <= 17) Age 15-17 years
Age_18to24 mgra 100,000 (persons.AGEP >= 18) & (persons.AGEP <= 24) Age 18-24 years
Age_25to34 mgra 100,000 (persons.AGEP >= 25) & (persons.AGEP <= 34) Age 25-34 years
Age_35to44 mgra 100,000 (persons.AGEP >= 35) & (persons.AGEP <= 44) Age 35-44 years
Age_45to54 mgra 100,000 (persons.AGEP >= 45) & (persons.AGEP <= 54) Age 45-54 years
Age_55to64 mgra 100,000 (persons.AGEP >= 55) & (persons.AGEP <= 64) Age 55-64 years
Age_65to74 mgra 100,000 (persons.AGEP >= 65) & (persons.AGEP <= 74) Age 65-74 years
Age_75to84 mgra 100,000 (persons.AGEP >= 75) & (persons.AGEP <= 84) Age 75-84 years
Age_85Plus mgra 100,000 persons.AGEP >= 85 Age 85 or older

Variable: AGEP = Age in years at time of survey

Race/Ethnicity (6 controls)

Control Name Geography Importance Expression Description
Asian mgra 200,000 persons.race == 'Asian alone' Asian alone
Black mgra 200,000 persons.race == 'Black or African American alone' Black or African American alone
Hispanic mgra 200,000 persons.race == 'Hispanic' Hispanic
Other mgra 200,000 persons.race == 'Other' Other race
Two_or_more mgra 200,000 persons.race == 'Two or More Races' Two or more races
White mgra 200,000 persons.race == 'White alone' White alone

These six categories and string labels match the fitting expressions in controls.csv.

Employment and Labor Force (18 controls - Region level only)

Employment by Industry (14 controls)

Control Name Importance Expression Description
job_1 350,000 (persons.NAICS2 == '92') & (persons.laborforce == 1) Public administration
job_2 350,000 (persons.NAICS2 == 'MIL') & (persons.laborforce == 1) Military
job_3 350,000 ((persons.NAICS2 == '11') | (persons.NAICS2 == '21')) & (persons.laborforce == 1) Agriculture and mining
job_4 350,000 ((persons.NAICS2 == '51') | (persons.NAICS2 == '54') | (persons.NAICS2 == '56')) & (persons.laborforce == 1) Information, professional, and administrative services
job_5 350,000 ((persons.NAICS2 == '52') | (persons.NAICS2 == '53') | (persons.NAICS2 == '55')) & (persons.laborforce == 1) Finance, real estate, and management
job_6 350,000 (persons.NAICS2 == '61') & (persons.laborforce == 1) Educational services
job_7 350,000 (persons.NAICS2 == '62') & (persons.laborforce == 1) Health care and social assistance
job_8 350,000 ((persons.NAICS2 == '44') | (persons.NAICS2 == '45') | (persons.NAICS2 == '4M')) & (persons.laborforce == 1) Retail trade
job_9 350,000 ((persons.NAICS2 == '23') | (persons.NAICS2 == '48') | (persons.NAICS2 == '49')) & (persons.laborforce == 1) Construction and transportation/warehousing
job_10 350,000 ((persons.NAICS2 == '22') | (persons.NAICS2 == '31') | (persons.NAICS2 == '32') | (persons.NAICS2 == '33') | (persons.NAICS2 == '42') | (persons.NAICS2 == '3M')) & (persons.laborforce == 1) Utilities, manufacturing, and wholesale trade
job_11 350,000 (persons.NAICS2 == '71') & (persons.laborforce == 1) Arts, entertainment, and recreation
job_12 350,000 (persons.NAICS2 == '721') & (persons.laborforce == 1) Accommodation
job_13 350,000 (persons.NAICS2 == '722') & (persons.laborforce == 1) Food services
job_14 350,000 (persons.NAICS2 == '81') & (persons.laborforce == 1) Other services

Labor Force by Race/Ethnicity (4 controls)

Control Name Importance Expression Description
lfp_black 1,225,000 (persons.race == 'Black or African American alone') & ((persons.ESR == 1) | (persons.ESR == 2) | (persons.ESR == 3)) Black or African American labor force
lfp_hispanic 1,225,000 (persons.race == 'Hispanic') & ((persons.ESR == 1) | (persons.ESR == 2) | (persons.ESR == 3)) Hispanic labor force
lfp_other 1,225,000 ((persons.race == 'Other') | (persons.race == 'Two or More Races') | (persons.race == 'Asian alone')) & ((persons.ESR == 1) | (persons.ESR == 2) | (persons.ESR == 3)) Other, two-or-more-race, and Asian labor force
lfp_white 1,225,000 (persons.race == 'White alone') & ((persons.ESR == 1) | (persons.ESR == 2) | (persons.ESR == 3)) White labor force

All 18 employment and labor-force controls apply at the region geography.

Group Quarters Controls (3 separate runs)

Each group-quarters (GQ) type is processed in its own PopulationSim run, using a type-specific configuration directory, settings file, seed data, and MGRA control data. These are fitting controls in the GQ runs, not post-IPF exact-sampling steps.

GQ type Configuration Control field Importance Expression
Military configs_gq_mil GQ_Military 10,000,000,000 households.gq_type == 1
College configs_gq_col GQ_College 10,000,000,000 households.gq_type == 2
Other configs_gq_oth GQ_Other 5,000,000,000 households.gq_type == 3

Each directory contains a controls.csv defining the Total_GQ MGRA target and a settings.yaml that selects the corresponding GQ household/person seed files and MGRA control data. The settings use Total_GQ as the total-household control and write GQ synthetic population outputs.

Control Data Sources

Definitions Configuration file
54 fitting controls populationsim/configs/controls.csv
2 reporting measures populationsim/configs/reporting_controls.csv
GQ fitting controls and run settings populationsim/configs_gq_mil, configs_gq_col, and configs_gq_oth

Adding Custom Controls

Fitting-control definitions use this schema in populationsim/configs/controls.csv:

target,geography,seed_table,importance,control_field,expression
HHSize_1,mgra,households,250000,HHSize_1,households.NP == 1

Reporting-measure definitions use this separate schema in populationsim/configs/reporting_controls.csv:

target,geography,seed_table,control_field,population,expression
HHChild_0,mgra,households,HHChild_0,households,households.HUPAC == 4

Next: Algorithm Details - How PopulationSim balances the fitting controls

Clone this wiki locally