feat: P7 capstone — M0-M7 analysis for 47 economies - #9
Draft
huongctu wants to merge 2 commits into
Draft
Conversation
Real results from pooled_wbes_6waves.csv (n=8,253 analytic sample): Full pool M3 cubic: β1=+0.326** β2=+0.619 β3=-1.792** TP1=38.7% TCI: β=+0.194*** (M4) DAI: β=+0.120*** (M5) VNM cubic (Lind-Mehlum all significant): 2009 TP1=3% | 2015 TP1=31.7% | 2023 TP1=47.6% → S-curve shift TCI: 0.371*** (2009) / null (2015) / 0.147** (2023) DAI: 0.275** (2009) / null (2015) / null (2023) CHN cubic: 2012 TP1=19.6% TP2=82.7% p=0.0005 2024 TP1=28.9% TP2=104.9% p=0.018 TCI: null (2012) / 0.294*** (2024) — digital maturation SGP 2023: β1=+4.088*** (strong linear upslope) TCI: 0.168*** | DAI: null (ubiquitous digital) Period gradient: P1 TP1=12.6% | P2 TP1=31.7% | P3 TP1=49.3% → turning point rising Outputs: data/analysis/p7/ (9 CSV files) https://claude.ai/code/session_017pAPKv2UCcCHSwUdJ44Ek2
huongctu
force-pushed
the
claude/thesis-data-47-countries-Vp6DZ
branch
from
May 5, 2026 19:35
14e34ad to
264ea51
Compare
- wbes/config_wbes.py: 47-economy catalogue with ICRV regimes, wave years, raw variable map, and wave-specific overrides for WBES codebook changes - wbes/01_download.py: checklist + check/download helper for all 47 surveys - wbes/02_harmonize.py: reads raw .dta files per economy, maps codebook variables to harmonised names, derives ln_labor_prod / TCI / DAI composites, outputs /tmp/wbes/pool.csv; falls back to 6-wave pool when no .dta found - P7_capstone_47countries_analysis.py: fix _norm_pool47 to accept export_pct and foreign_own column names (present in 6-wave fallback pool), preventing all-NaN fdi10 that caused zero-size OLS matrix error Results (3-country fallback, n=8,253): Full pool M3: β1=+0.326** β2=+0.619 β3=-1.792** TP1=38.7% VNM TP1 trajectory: 3.0% (2009) → 31.7% (2015) → 47.6% (2023) TCI β=+0.194*** DAI β=+0.120*** (M4/M5 full pool) To scale to all 47 economies: 1. Download .dta files from World Bank WBES portal 2. Place under raw/<ISO3>/<ISO3>_<year>_wbes.dta 3. python wbes/02_harmonize.py → re-run P7 script https://claude.ai/code/session_017pAPKv2UCcCHSwUdJ44Ek2
huongctu
added a commit
that referenced
this pull request
May 7, 2026
…ạn front-loading effect + tariff uncertainty trong khung ICRV (đảo dấu FSTS Emerging high-FDI vs low-FDI; phân hóa lớn vs SME) → biến Tariff_Front_Loading_2025_2026 (rob #8). §7.3.3 thêm hàm ý (9) Hedging strategy 4 nguyên tắc: (a) đa dạng hóa thị trường giảm Mỹ ~30% → RCEP+CPTPP+ACFTA+GCC+India target 22-25%; (b) buffer inventory 60-90 ngày + USD MFN clauses; (c) higher-value FDI 30%→45-50%; (d) forex hedging + multi-currency 30 EUR/30 JPY/40 USD + fintech MoMo/ZaloPay/Wise. Biến Hedging_Capability_Index (rob #9). Theo NotebookLM 07/05/2026.
thuyhuongctu
referenced
this pull request
in thuyhuongctu/MY_THESIS_PHD_CANDIDATE_26
May 8, 2026
…pril 2026 review) - Fix #1: sync M2 coefficients to Table 2 (β=3.490/SE=0.902; β=−2.059/SE=1.082/p=0.053) - Fix #1: sync M6 DAI β=0.114, M7 DAI β=0.073 p<0.10, M8 β=3.023/SE=1.309/p=0.021 - Fix #1: correct marginal effects to +0.660 (FSTS=70%) and +1.818 (FSTS=100%) - Fix #2: correct R1 justification (website-only to test e-payment attribution, not foreign tech) - Fix #3: correct turning point to ≈88.6% uncentered (84.1% centered + mean 0.045) - Fix #4: reclassify Banalieva & Dhanaraj (2019) and Stallkamp & Schotter (2021) as conceptual - Fix #5: add Figure 1 editorial note on moderation arrow convention - Fix #6: add Cohen's f² values with Cohen (1988) reference - Fix #7: add Figure 2/3 swap editorial note - Fix #8: add deflation cross-section clarification in §3.2 - Fix #9: decouple Coltman formative-measurement argument from construct-separation argument
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/P7_capstone_47countries_analysis.py— full Python pipeline for the P7 JIBR capstone paperscripts/P7_capstone_47countries.do— Stata replication for the same pipelineWhat the scripts do
Data: Auto-detects
/tmp/wbes/pool.csv(47-country full pool fromwbes/02_harmonize.py) or falls back todata/analysis/pooled_wbes_6waves.csv(6-wave pool for initial testing).Feature engineering (follows thesis §3.3):
lnLPwinsorised 1%/99% within country × yearFSTS_cmean-centred within wave;FSTS_c²,FSTS_c³TCI_z= z-std(mean(b8, e6)) within wave — 2-component primaryDAI_z= z-std(c22b) within wave — 1-component primaryModels M0–M7 (thesis Table 3.2) with country FE (47), year FE, sector FE:
Subgroup analyses: by ICRV regime (6 groups), by period (P1/P2/P3)
Tests: Lind-Mehlum cubic (TP1, TP2, Wald p); Paternoster cross-regime z-tests (H5)
Outputs:
data/analysis/p7/— 7 CSV filesTest plan
/tmp/wbes/pool.csvis availablehttps://claude.ai/code/session_017pAPKv2UCcCHSwUdJ44Ek2
Generated by Claude Code