$ ⌘K

Quick Start — Brain Drain vs. Brain Gain

step_count: 7· runtime: 2-5 minutes

Core analysis for any country-year panel exploring whether high-skilled emigration on net raises or lowers the origin-country skilled human capital stock. Based on the Batista et al. (2025) review framework.

// pipeline
7 steps· DAG
01

Data Quality Gate

action data_quality_gateon fail: abort
config (4 keys)
{
  "constructs": [
    "high_skilled_emigration_rate",
    "human_capital_stock_origin",
    "skill_acquisition_response",
    "remittances_inflow"
  ],
  "max_missing_pct": 0.3,
  "min_observations": 50,
  "required_panel_dim": "country-year"
}
02

Descriptive — Emigration Rates by Skill

engine descriptive_summary
config (2 keys)
{
  "group_by": [
    "origin_country",
    "skill_category"
  ],
  "variables": [
    "high_skilled_emigration_rate"
  ]
}
expected results (1 key)
{
  "high_skilled_emigration_rate": {
    "range_check": [
      0,
      1
    ]
  }
}
03

Correlations — Key Channels

engine correlation_matrix
config (1 key)
{
  "variables": [
    "high_skilled_emigration_rate",
    "human_capital_stock_origin",
    "skill_acquisition_response",
    "remittances_inflow",
    "return_migration",
    "diaspora_network_size",
    "patent_output_origin"
  ]
}
expected results (2 keys)
{
  "remittances_inflow↔human_capital_stock_origin": {
    "direction": "positive"
  },
  "skill_acquisition_response↔human_capital_stock_origin": {
    "direction": "positive"
  }
}
04

Net Human Capital — DID Around Visa Shock

engine difference_in_differencespredictor_correlationscompare_to_kb
config (5 keys)
{
  "controls": [
    "gdp_per_capita",
    "population",
    "training_supply_elasticity"
  ],
  "outcome": "human_capital_stock_origin",
  "time_var": "year",
  "treatment": "migration_visa_policy_shock",
  "unit_var": "origin_country"
}
expected results (1 key)
{
  "migration_visa_policy_shock": {
    "direction": "positive",
    "rationale": "Replicates Filipino nurses (9:1) and Indian IT (5.8% rise) findings"
  }
}
05

Remittance → Welfare (Shift-Share IV)

engine shift_share_ivpredictor_correlations
config (5 keys)
{
  "controls": [
    "province_fixed_effects",
    "year_fixed_effects"
  ],
  "endogenous": "remittances_inflow",
  "outcome": "household_income_origin",
  "shares": "historical_destination_country_shares",
  "shifts": "destination_exchange_rate_shocks"
}
expected results (1 key)
{
  "remittances_inflow": {
    "direction": "positive"
  }
}
06

Population Health — Null Test

engine instrumental_variables
config (4 keys)
{
  "controls": [
    "gdp_per_capita",
    "public_health_spending"
  ],
  "endogenous": "high_skilled_emigration_rate",
  "instruments": [
    "destination_visa_policy"
  ],
  "outcome": "infant_mortality_origin"
}
expected results (1 key)
{
  "high_skilled_emigration_rate": {
    "direction": null,
    "rationale": "53-African-country IV evidence finds no effect on health"
  }
}
// from pax
High-Skilled International Migration & Origin-Country Effects
// engines
engine.descriptive_summaryengine.shift_share_ivengine.difference_in_differencesengine.synthesis_reportengine.correlation_matrixengine.instrumental_variables
// note
step bodies extracted from the .pax archive at build time. download the parent pax for the full yaml.
[ download batista-et-al-2025-brain-drain-gain.pax.tar.gz ]