# World Bank public data / 六国奥肯关系练习 2026-10-13 公开 API 快照。USA、CHN、JPN、DEU、GBR、CAN;GDP 年增长率 NY.GDP.MKTP.KD.ZG;ILO modeled 总失业率 SL.UEM.TOTL.ZS。1991–2024 各 34 年,1991 为差分提供上一年,实际估计为 1992–2024,各 33 个观测。 ## 离线复做 / Offline rerun 解压到新空目录。下面所有命令从包根目录运行;保留原 output/ 作为参考,先复制包到另一个目录再重跑。程序会覆写该包内 output/ 同名文件。Stata 的 clear all 会清空该新会话的内存状态,先保存现有工作。 Python(本次使用 3.11.11;依赖版本见 requirements.txt;安装依赖会访问软件源): ```sh python -m venv .venv # macOS/Linux source .venv/bin/activate # Windows: .venv\Scripts\activate python -m pip install -r requirements.txt python python/analyze.py ``` Stata:在新的合法 Stata 会话中切换到解压目录,然后运行: ```stata do stata/analysis.do ``` Stata 不需要 Python 或任何第三方命令即可从包内 CSV 独立分析。本次 macOS Stata 19.5 已实算;程序声明 version 17,未以 Windows 真机测试证明跨平台结果。 Check output/python/ and output/stata/: both must show six countries, N=33 and the same estimates (rounding may differ). Completion markers are WORLDBANK_PYTHON_COMPLETED / WORLDBANK_STATA_COMPLETED. Python figures are SVG + PNG; Stata separately creates SVG + PNG. Compare estimates.csv and the sorted analysis-data.csv values, not image-byte hashes: SVG metadata, colors and layout differ by engine/version. ## 重新下载 / Refresh public data 离线分析不会请求网络。只有显式运行以下命令才向官方 API 重新请求公开数据,覆写 raw/、data/indicators.csv 和 provenance.json: ```sh python fetch-data.py ``` 再重新运行两套分析。新结果不保证与网页相同,因为数据可能修订。新抓取若失败,查看实际错误;不要把旧输出当成本次成功。下载脚本检查分页、国家年份、重复键和数量。 ## 方法与文件 / Method and files Δu = unemployment(t) − unemployment(t−1), in percentage points. Regress Δu on real GDP growth (%) with an intercept, separately by country. Only complete consecutive-year pairs enter the model. No added imputation. Conventional OLS standard errors and Student-t confidence intervals; the figure band is a 95% confidence interval for the conditional mean fitted line, NOT a prediction interval or slope-difference test. This exercise does not adjust inference for serial correlation, pandemic outliers or structural breaks, does not identify causality and does not rank countries. The ILO modeled series includes imputed values and is not identical to each country's headline unemployment statistics. - raw/: two API data responses + two indicator metadata responses. - data/indicators.csv: 204 country-year input rows, readable in Excel. - python/analyze.py + stata/analysis.do: independent implementations. - output/python/: analysis-data.csv, estimates.csv, result.json, run log and figures. - output/stata/: analysis-data.csv, estimates.csv, actual run log and figures. - output/cross-check.json: maintainer's numerical comparison for THIS published snapshot, not automatic certification of your rerun. - provenance.json: API URL / download timestamp / data revision / SHA-256. - NOTICE.md: World Bank / ILO attribution, modifications, data license and terms. These are actual standalone computations on public data, not a claim that a model completed this request in Marx Max. No personal account, research file, paper PDF, Stata binary or third-party executable is included. In Marx Max, create a separate practice project and check actual code/results; cloud AI may receive conversation and tool-returned content.