Multi-Region Provincial Panel Analysis (Vietnam 1995–2025 · N = 155 Region-Year Obs) · Real-Time Matrix OLS & Two-Way Fixed-Effects (TWFE) · SSP Scenario Simulator.
Annual regional mean Temperature Anomaly (+°C) overlaid against selected sectoral employment trajectory.
Each point represents a region-year observation; solid line shows real-time OLS/Quadratic fit.
| Explanatory Variable (Regressor) | Coef. (β̂) | Robust SE | t-Stat | p-Value | 95% Conf. Interval | Significance |
|---|
Simulate CMIP6 SSP2-4.5 / SSP5-8.5 warming & monsoon rainfall shocks against national workforce baseline (52.4M employed).
| Economic Sector | Baseline Workforce | Predicted Growth Δ (%) | FTE Job / Hours Shift | Vulnerability / Reallocation |
|---|
100% reproducible econometric pipeline ready to run on World Bank CCKP / ERA5 + ILOSTAT / GSO Labor Force Survey microdata.
import pandas as pd
import numpy as np
import statsmodels.formula.api as smf
from linearmodels.panel import PanelOLS
# 1. Load cleaned ERA5 Climate + ILOSTAT / GSO Provincial Labor Panel (1995-2025)
df = pd.read_csv("climate_employment_panel_1995_2025.csv")
df["temp_sq"] = df["temp_anomaly_c"] ** 2
df["rain_100mm"] = df["rain_anomaly_mm"] / 100.0
df = df.set_index(["region", "year"])
# 2. Two-Way Fixed Effects (Region FE + Year FE) with Driscoll-Kraay / Clustered SEs
mod = PanelOLS.from_formula(
"agri_emp_growth ~ 1 + temp_anomaly_c + temp_sq + rain_100mm + extreme_heat_days + gdp_growth_ctrl + EntityEffects + TimeEffects",
data=df
)
res_twfe = mod.fit(cov_type="clustered", cluster_entity=True, cluster_time=True)
print(res_twfe.summary)
# --- R Equivalent (fixest::feols with Conley / Two-Way Clustered Standard Errors) ---
# library(fixest)
# est_twfe <- feols(
# c(agri_emp_growth, const_hours_growth, mfg_emp_growth, tourism_emp_growth, services_emp_growth) ~
# temp_anomaly_c + I(temp_anomaly_c^2) + rain_100mm + extreme_heat_days + gdp_growth_ctrl | region + year,
# data = panel_df, vcov = ~region + year
# )
# etable(est_twfe, tex = FALSE)
Columns: year,region,temp_c,rain_mm,heat_days,gdp_ctrl,agri,const,mfg,tourism,services
| Year | Region | ΔTemp (°C) | Rain Anom (mm) | >35°C Days | Agri Δ% | Const Hrs Δ% | Mfg Δ% | Tourism Δ% | Services Δ% |
|---|