[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1PDYZ8EAE4QEXW02W1JKZ":3,"skill-same:01M7F1PDYZ8EAE4QEXW02W1JKZ":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M7F1PDYZ8EAE4QEXW02W1JKZ","python-panel-data",null,"> Generates rigorous panel and causal-inference code in Python using `pyfixest` (modern fixest port), `linearmodels.PanelOLS`, `statsmodels`, and pandas, with proper fixed effects, clustering, weak-IV diagnostics, event studies, and DIME-aligned reproducibility. Honest about Python's smaller modern-","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: python-panel-data\ndescription: \"> Generates rigorous panel and causal-inference code in Python using `pyfixest` (modern fixest port), `linearmodels.PanelOLS`, `statsmodels`, and pandas, with proper fixed effects, clustering, weak-IV diagnostics, event studies, and DIME-aligned reproducibility. Honest about Python's smaller modern-\"\ncategory: economics\nversion: 1.0.0\ndisable-model-invocation: false\nrisk: low\nsource: \"https:\u002F\u002Fgithub.com\u002FJonasWeinert\u002FEconAgentSkills\"\nsource_repository: \"JonasWeinert\u002FEconAgentSkills\"\nsource_path: \"_skills\u002Fanalysis\u002Fpython-panel-data\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n# Python Panel Data\n\nGenerate rigorous panel and causal-inference code in Python. The modern Python ecosystem is `pyfixest` for `fixest`-style speed and syntax, `linearmodels.PanelOLS` for textbook panel models, and `statsmodels` for general purpose. Where Python's modern-DiD support is incomplete, point the user to R.\n\n## Operating Principles\n\n1. **Identification before code.** State the estimand, the source of identifying variation, and the threats to identification before writing any model.\n2. **Use `pyfixest` first when speed and modern syntax matter.** Fall back to `linearmodels.PanelOLS` for textbook panel models, `statsmodels` for general regression and IV with simple specs.\n3. **Be honest about ecosystem gaps.** Python's heterogeneity-robust DiD support is weaker than R or Stata. For Callaway-Sant'Anna, BJS, or de Chaisemartin-D'Haultfoeuille, use the corresponding R or Stata skill, or call R via `rpy2`.\n4. **Reproducibility discipline.** Pin versions in `pyproject.toml` or `requirements.txt`. Use `pathlib` for paths, `pd.read_*` with `dtype=` arguments, and seed every random call.\n5. **Tables are produced, never copy-pasted.** Use `pyfixest.etable`, `linearmodels` LaTeX export, or `stargazer` for `statsmodels`.\n\n## Decision Policy\n\nThis skill follows the repo-wide [Agent Policy](..\u002F..\u002FAGENT_POLICY.md).\n\n**ASK before proceeding** (blocking):\n\n1. Estimand and identification strategy.\n2. Library choice when both apply: `pyfixest` for speed and modern syntax vs `linearmodels.PanelOLS` for textbook panel API.\n3. Cluster level for inference.\n4. Whether to switch language (R \u002F Stata) for parts where Python's ecosystem is weaker (Callaway-Sant'Anna, BJS, AR weak-IV CIs).\n\n**DEFAULT + flag** (use this default; tell the user how to override):\n\n- `pyfixest.feols` for panel TWFE, event studies (`sunab`), and IV with FE.\n- `linearmodels.PanelOLS` when the user wants explicit `EntityEffects` \u002F `TimeEffects` \u002F RandomEffects \u002F FirstDifferenceOLS.\n- `statsmodels` only for cross-section logit\u002Fprobit\u002FGLM\u002Fsimple OLS.\n- `wildboottest` package when G \u003C 30; otherwise `vcov = {\"CRV1\": \"unit\"}`.\n- Outputs as parquet in `data\u002Fprocessed\u002F`; tables to `paper\u002Ftabs\u002F` via `pyfixest.etable`.\n\n**DOCUMENT and proceed** (write into the decisions log):\n\n- Library choice and the reason if non-default.\n- Panel structure (balanced \u002F unbalanced \u002F rotating) inferred from the data.\n- Cross-language jumps (e.g. \"Used R `did` package via subprocess for Callaway-Sant'Anna because no mature Python equivalent\").\n\n`PROCEED` items: `pyproject.toml` + lockfile, `Path(__file__).resolve().parents[N]`, `numpy.random.default_rng(20240101)`, `assert df.duplicated([keys]).sum() == 0` after every load.\n\n## Pre-flight Checklist\n\nBefore writing code, confirm with the user — and write the answers as a header docstring:\n\n- **Estimand.** ATT, LATE, ITT, descriptive?\n- **Unit of observation and panel keys.** Assert with `df.duplicated([\"unit\", \"time\"]).sum() == 0`.\n- **Treatment timing.** Single shock, simultaneous, staggered, or reversible?\n- **Identifying variation.** Which comparison drives the coefficient?\n- **Clustering level.** Where is treatment assigned, or where does within-group correlation live?\n- **Sample.** Document each filter with sample sizes.\n- **Output target.** Working paper, slides, journal submission, or exploratory.\n\n## Library Choice\n\n| Need | Library | Notes |\n|------|---------|-------|\n| Panel TWFE, event studies, IV with FE | `pyfixest` | Fastest; mirrors R `fixest`; `feols`, `fepois`, `iplot` |\n| Textbook panel: PanelOLS, RandomEffects, FirstDifferenceOLS, BetweenOLS | `linearmodels` | Rich panel API; explicit `EntityEffects`, `TimeEffects` |\n| Cross-section IV2SLS, GMM | `linearmodels` | `IV2SLS`, `IVGMM` |\n| Logit\u002Fprobit, GLM, simple OLS | `statsmodels` | Standard, well-documented |\n| Tables (multiple models) | `pyfixest.etable`, `stargazer`, `linearmodels` `compare()` | Pick one and stick with it |\n\nInstall:\n\n```bash\npip install pyfixest linearmodels statsmodels pandas pyarrow stargazer\n```\n\n## Estimator Decision Tree\n\n### Difference-in-Differences\n\n```\nSingle shock, two groups, uniform timing\n└── pyfixest.feols(\"y ~ treat_post | unit + time\", data=df,\n                   vcov={\"CRV1\": \"unit\"})\n\nStaggered adoption (the realistic case)\n├── Sun-Abraham via pyfixest:\n│     pyfixest.feols(\"y ~ sunab(cohort, time) | unit + time\",\n│                    data=df, vcov={\"CRV1\": \"unit\"})\n├── BJS imputation: not yet a polished package; implement manually\n│   or use the `differences` package (limited).\n└── Callaway-Sant'Anna: use R `did` via rpy2, or switch to the\n    R or Stata skill for that estimator.\n\nContinuous or non-binary treatment\n└── No mature Python implementation. Use Stata\n    `did_multiplegt_dyn` or R `DIDmultiplegt`.\n```\n\n### Instrumental Variables\n\n```\nCross-section 2SLS:\n  from linearmodels import IV2SLS\n  IV2SLS.from_formula(\"y ~ 1 + x_exog + [endog ~ z]\", data=df).fit(\n      cov_type=\"clustered\", clusters=df.cluster\n  )\n\nPanel IV with high-dim FE:\n  pyfixest.feols(\"y ~ x_exog | unit + time | endog ~ z\",\n                 data=df, vcov={\"CRV1\": \"unit\"})\n\nWeak-IV diagnostics:\n  - linearmodels reports Kleibergen-Paap rk Wald F.\n  - For Olea-Pflueger effective F or AR sets, use R `ivDiag`,\n    Stata `weakivtest`, or implement AR by hand.\n\nEffective F:\n  - F >= 100 → conventional 2SLS is fine.\n  - 10 \u003C= F \u003C 100 → use AR or tF; do not rely on conventional t.\n  - F \u003C 10  → instrument is weak; do not interpret 2SLS causally.\n```\n\n### Inference\n\n```\nNumber of clusters G:\n  G >= 50      → cluster-robust SE is fine\n  30 \u003C= G \u003C 50 → consider HC3-style small-sample correction\n  G \u003C 30       → use wild cluster bootstrap (`pyfixest` supports\n                 `wildboottest` via the `wildboottest` package)\n                 or call Stata `boottest` \u002F R `fwildclusterboot`.\n\nMulti-way clustering:\n  pyfixest:    vcov={\"CRV1\": [\"unit\", \"year\"]}\n  linearmodels: cov_type=\"clustered\", clusters=df[[\"unit\", \"year\"]]\n```\n\n## Output Skeleton\n\nEvery analysis script should follow:\n\n```python\n\"\"\"\nanalysis_main.py\nProject: ProjectABC\nPurpose: Main DiD specification on outcome Y\nInputs : data\u002Fprocessed\u002Fanalysis.parquet\nOutputs: results\u002Ftables\u002Ftable_did_main.tex\n         results\u002Ffigures\u002Fevent_study.pdf\nEstimand: ATT of program on Y\nCluster : at the unit level (treatment assignment)\n\"\"\"\nfrom pathlib import Path\nimport pandas as pd\nimport pyfixest as pf\n\nPROJECT = Path(__file__).resolve().parents[2]\nDATA_FINAL = PROJECT \u002F \"data\" \u002F \"processed\"\nRESULTS    = PROJECT \u002F \"results\"\nRESULTS.joinpath(\"tables\").mkdir(parents=True, exist_ok=True)\nRESULTS.joinpath(\"figures\").mkdir(parents=True, exist_ok=True)\n\n# 1. Load and assert structure\ndf = pd.read_parquet(DATA_FINAL \u002F \"analysis.parquet\")\nassert df.duplicated([\"unit_id\", \"year\"]).sum() == 0\n\n# 2. Sample construction\ndf = df.dropna(subset=[\"outcome\"])  # log this filter\n\n# 3. Main and robustness specs\nm_main = pf.feols(\"outcome ~ treat_post | unit_id + year\",\n                  data=df, vcov={\"CRV1\": \"unit_id\"})\nm_two  = pf.feols(\"outcome ~ treat_post | unit_id + year\",\n                  data=df, vcov={\"CRV1\": [\"unit_id\", \"year\"]})\n\n# 4. Export\npf.etable([m_main, m_two],\n          type=\"tex\",\n          file_name=str(RESULTS \u002F \"tables\" \u002F \"table_did_main.tex\"))\n```\n\n## Common Pitfalls\n\n- Plain TWFE on staggered timing in `pyfixest` is just as biased as in `fixest`. Use `sunab` or switch language.\n- Forgetting to set the panel index in `linearmodels`. Always `df.set_index([\"unit\", \"time\"])` before `PanelOLS.from_formula`.\n- Cluster-robust SE with very few clusters — undercoverage; use wild bootstrap.\n- Mixing `pyfixest` and `linearmodels` results in the same table — they sometimes treat absorbed FE differently. Stay within one framework per table.\n- Hardcoded paths — use `pathlib.Path(__file__).resolve().parents[N]`.\n- `df[\"x\"] = ...` after a chained operation losing `.copy()` — use `df = df.assign(...)` or explicit `.copy()`.\n\n## Additional Resources\n\n- `reference.md` — extended code patterns for each estimator family.\n- `examples\u002F` — runnable scripts:\n  - `examples\u002Ftwfe_pyfixest.py` — TWFE with pyfixest\n  - `examples\u002Ftwfe_linearmodels.py` — TWFE with linearmodels.PanelOLS\n  - `examples\u002Fevent_study_sun_abraham.py` — Sun-Abraham via pyfixest\n  - `examples\u002Fiv_panel_pyfixest.py` — panel IV with diagnostics\n  - `examples\u002Fclustered_inference.py` — multi-way clustering and CR2\n  - `examples\u002Fbalance_table.py` — pandas + scipy balance tables\n\n## Requirements\n\n- Python >= 3.10\n- Core: `pandas`, `pyarrow`, `numpy`, `scipy`\n- Econometrics: `pyfixest`, `linearmodels`, `statsmodels`\n- Tables and plots: `stargazer`, `matplotlib`\n\n```bash\npip install pandas pyarrow numpy scipy pyfixest linearmodels statsmodels stargazer matplotlib\n```\n\n## References\n\n- Berge (2018), `fixest`: Fast Fixed Effects Estimation. Original reference for the `fixest`\u002F`pyfixest` family.\n- Sun & Abraham (2021). *Estimating Dynamic Treatment Effects in Event Studies*. JoE.\n- Borusyak, Jaravel & Spiess (2024). *Revisiting Event Study Designs*. ReStud.\n- Olea & Pflueger (2013). *A Robust Test for Weak Instruments*. JBES.\n- Wooldridge (2010). *Econometric Analysis of Cross Section and Panel Data*.\n- DIME Analytics, [Reproducible Research](https:\u002F\u002Fdimewiki.worldbank.org\u002FReproducible_Research).\n- DIME Analytics, [Data Analysis](https:\u002F\u002Fdimewiki.worldbank.org\u002FData_Analysis).\n- pyfixest documentation: https:\u002F\u002Fpy-econometrics.github.io\u002Fpyfixest\u002F\n- linearmodels documentation: https:\u002F\u002Fbashtage.github.io\u002Flinearmodels\u002F\n","# Python Panel Data\n\nGenerate rigorous panel and causal-inference code in Python. The modern Python ecosystem is `pyfixest` for `fixest`-style speed and syntax, `linearmodels.PanelOLS` for textbook panel models, and `statsmodels` for general purpose. Where Python's modern-DiD support is incomplete, point the user to R.\n\n## Operating Principles\n\n1. **Identification before code.** State the estimand, the source of identifying variation, and the threats to identification before writing any model.\n2. **Use `pyfixest` first when speed and modern syntax matter.** Fall back to `linearmodels.PanelOLS` for textbook panel models, `statsmodels` for general regression and IV with simple specs.\n3. **Be honest about ecosystem gaps.** Python's heterogeneity-robust DiD support is weaker than R or Stata. For Callaway-Sant'Anna, BJS, or de Chaisemartin-D'Haultfoeuille, use the corresponding R or Stata skill, or call R via `rpy2`.\n4. **Reproducibility discipline.** Pin versions in `pyproject.toml` or `requirements.txt`. Use `pathlib` for paths, `pd.read_*` with `dtype=` arguments, and seed every random call.\n5. **Tables are produced, never copy-pasted.** Use `pyfixest.etable`, `linearmodels` LaTeX export, or `stargazer` for `statsmodels`.\n\n## Decision Policy\n\nThis skill follows the repo-wide [Agent Policy](..\u002F..\u002FAGENT_POLICY.md).\n\n**ASK before proceeding** (blocking):\n\n1. Estimand and identification strategy.\n2. Library choice when both apply: `pyfixest` for speed and modern syntax vs `linearmodels.PanelOLS` for textbook panel API.\n3. Cluster level for inference.\n4. Whether to switch language (R \u002F Stata) for parts where Python's ecosystem is weaker (Callaway-Sant'Anna, BJS, AR weak-IV CIs).\n\n**DEFAULT + flag** (use this default; tell the user how to override):\n\n- `pyfixest.feols` for panel TWFE, event studies (`sunab`), and IV with FE.\n- `linearmodels.PanelOLS` when the user wants explicit `EntityEffects` \u002F `TimeEffects` \u002F RandomEffects \u002F FirstDifferenceOLS.\n- `statsmodels` only for cross-section logit\u002Fprobit\u002FGLM\u002Fsimple OLS.\n- `wildboottest` package when G \u003C 30; otherwise `vcov = {\"CRV1\": \"unit\"}`.\n- Outputs as parquet in `data\u002Fprocessed\u002F`; tables to `paper\u002Ftabs\u002F` via `pyfixest.etable`.\n\n**DOCUMENT and proceed** (write into the decisions log):\n\n- Library choice and the reason if non-default.\n- Panel structure (balanced \u002F unbalanced \u002F rotating) inferred from the data.\n- Cross-language jumps (e.g. \"Used R `did` package via subprocess for Callaway-Sant'Anna because no mature Python equivalent\").\n\n`PROCEED` items: `pyproject.toml` + lockfile, `Path(__file__).resolve().parents[N]`, `numpy.random.default_rng(20240101)`, `assert df.duplicated([keys]).sum() == 0` after every load.\n\n## Pre-flight Checklist\n\nBefore writing code, confirm with the user — and write the answers as a header docstring:\n\n- **Estimand.** ATT, LATE, ITT, descriptive?\n- **Unit of observation and panel keys.** Assert with `df.duplicated([\"unit\", \"time\"]).sum() == 0`.\n- **Treatment timing.** Single shock, simultaneous, staggered, or reversible?\n- **Identifying variation.** Which comparison drives the coefficient?\n- **Clustering level.** Where is treatment assigned, or where does within-group correlation live?\n- **Sample.** Document each filter with sample sizes.\n- **Output target.** Working paper, slides, journal submission, or exploratory.\n\n## Library Choice\n\n| Need | Library | Notes |\n|------|---------|-------|\n| Panel TWFE, event studies, IV with FE | `pyfixest` | Fastest; mirrors R `fixest`; `feols`, `fepois`, `iplot` |\n| Textbook panel: PanelOLS, RandomEffects, FirstDifferenceOLS, BetweenOLS | `linearmodels` | Rich panel API; explicit `EntityEffects`, `TimeEffects` |\n| Cross-section IV2SLS, GMM | `linearmodels` | `IV2SLS`, `IVGMM` |\n| Logit\u002Fprobit, GLM, simple OLS | `statsmodels` | Standard, well-documented |\n| Tables (multiple models) | `pyfixest.etable`, `stargazer`, `linearmodels` `compare()` | Pick one and stick with it |\n\nInstall:\n\n```bash\npip install pyfixest linearmodels statsmodels pandas pyarrow stargazer\n```\n\n## Estimator Decision Tree\n\n### Difference-in-Differences\n\n```\nSingle shock, two groups, uniform timing\n└── pyfixest.feols(\"y ~ treat_post | unit + time\", data=df,\n                   vcov={\"CRV1\": \"unit\"})\n\nStaggered adoption (the realistic case)\n├── Sun-Abraham via pyfixest:\n│     pyfixest.feols(\"y ~ sunab(cohort, time) | unit + time\",\n│                    data=df, vcov={\"CRV1\": \"unit\"})\n├── BJS imputation: not yet a polished package; implement manually\n│   or use the `differences` package (limited).\n└── Callaway-Sant'Anna: use R `did` via rpy2, or switch to the\n    R or Stata skill for that estimator.\n\nContinuous or non-binary treatment\n└── No mature Python implementation. Use Stata\n    `did_multiplegt_dyn` or R `DIDmultiplegt`.\n```\n\n### Instrumental Variables\n\n```\nCross-section 2SLS:\n  from linearmodels import IV2SLS\n  IV2SLS.from_formula(\"y ~ 1 + x_exog + [endog ~ z]\", data=df).fit(\n      cov_type=\"clustered\", clusters=df.cluster\n  )\n\nPanel IV with high-dim FE:\n  pyfixest.feols(\"y ~ x_exog | unit + time | endog ~ z\",\n                 data=df, vcov={\"CRV1\": \"unit\"})\n\nWeak-IV diagnostics:\n  - linearmodels reports Kleibergen-Paap rk Wald F.\n  - For Olea-Pflueger effective F or AR sets, use R `ivDiag`,\n    Stata `weakivtest`, or implement AR by hand.\n\nEffective F:\n  - F >= 100 → conventional 2SLS is fine.\n  - 10 \u003C= F \u003C 100 → use AR or tF; do not rely on conventional t.\n  - F \u003C 10  → instrument is weak; do not interpret 2SLS causally.\n```\n\n### Inference\n\n```\nNumber of clusters G:\n  G >= 50      → cluster-robust SE is fine\n  30 \u003C= G \u003C 50 → consider HC3-style small-sample correction\n  G \u003C 30       → use wild cluster bootstrap (`pyfixest` supports\n                 `wildboottest` via the `wildboottest` package)\n                 or call Stata `boottest` \u002F R `fwildclusterboot`.\n\nMulti-way clustering:\n  pyfixest:    vcov={\"CRV1\": [\"unit\", \"year\"]}\n  linearmodels: cov_type=\"clustered\", clusters=df[[\"unit\", \"year\"]]\n```\n\n## Output Skeleton\n\nEvery analysis script should follow:\n\n```python\n\"\"\"\nanalysis_main.py\nProject: ProjectABC\nPurpose: Main DiD specification on outcome Y\nInputs : data\u002Fprocessed\u002Fanalysis.parquet\nOutputs: results\u002Ftables\u002Ftable_did_main.tex\n         results\u002Ffigures\u002Fevent_study.pdf\nEstimand: ATT of program on Y\nCluster : at the unit level (treatment assignment)\n\"\"\"\nfrom pathlib import Path\nimport pandas as pd\nimport pyfixest as pf\n\nPROJECT = Path(__file__).resolve().parents[2]\nDATA_FINAL = PROJECT \u002F \"data\" \u002F \"processed\"\nRESULTS    = PROJECT \u002F \"results\"\nRESULTS.joinpath(\"tables\").mkdir(parents=True, exist_ok=True)\nRESULTS.joinpath(\"figures\").mkdir(parents=True, exist_ok=True)\n\n# 1. Load and assert structure\ndf = pd.read_parquet(DATA_FINAL \u002F \"analysis.parquet\")\nassert df.duplicated([\"unit_id\", \"year\"]).sum() == 0\n\n# 2. Sample construction\ndf = df.dropna(subset=[\"outcome\"])  # log this filter\n\n# 3. Main and robustness specs\nm_main = pf.feols(\"outcome ~ treat_post | unit_id + year\",\n                  data=df, vcov={\"CRV1\": \"unit_id\"})\nm_two  = pf.feols(\"outcome ~ treat_post | unit_id + year\",\n                  data=df, vcov={\"CRV1\": [\"unit_id\", \"year\"]})\n\n# 4. Export\npf.etable([m_main, m_two],\n          type=\"tex\",\n          file_name=str(RESULTS \u002F \"tables\" \u002F \"table_did_main.tex\"))\n```\n\n## Common Pitfalls\n\n- Plain TWFE on staggered timing in `pyfixest` is just as biased as in `fixest`. Use `sunab` or switch language.\n- Forgetting to set the panel index in `linearmodels`. Always `df.set_index([\"unit\", \"time\"])` before `PanelOLS.from_formula`.\n- Cluster-robust SE with very few clusters — undercoverage; use wild bootstrap.\n- Mixing `pyfixest` and `linearmodels` results in the same table — they sometimes treat absorbed FE differently. Stay within one framework per table.\n- Hardcoded paths — use `pathlib.Path(__file__).resolve().parents[N]`.\n- `df[\"x\"] = ...` after a chained operation losing `.copy()` — use `df = df.assign(...)` or explicit `.copy()`.\n\n## Additional Resources\n\n- `reference.md` — extended code patterns for each estimator family.\n- `examples\u002F` — runnable scripts:\n  - `examples\u002Ftwfe_pyfixest.py` — TWFE with pyfixest\n  - `examples\u002Ftwfe_linearmodels.py` — TWFE with linearmodels.PanelOLS\n  - `examples\u002Fevent_study_sun_abraham.py` — Sun-Abraham via pyfixest\n  - `examples\u002Fiv_panel_pyfixest.py` — panel IV with diagnostics\n  - `examples\u002Fclustered_inference.py` — multi-way clustering and CR2\n  - `examples\u002Fbalance_table.py` — pandas + scipy balance tables\n\n## Requirements\n\n- Python >= 3.10\n- Core: `pandas`, `pyarrow`, `numpy`, `scipy`\n- Econometrics: `pyfixest`, `linearmodels`, `statsmodels`\n- Tables and plots: `stargazer`, `matplotlib`\n\n```bash\npip install pandas pyarrow numpy scipy pyfixest linearmodels statsmodels stargazer matplotlib\n```\n\n## References\n\n- Berge (2018), `fixest`: Fast Fixed Effects Estimation. Original reference for the `fixest`\u002F`pyfixest` family.\n- Sun & Abraham (2021). *Estimating Dynamic Treatment Effects in Event Studies*. JoE.\n- Borusyak, Jaravel & Spiess (2024). *Revisiting Event Study Designs*. ReStud.\n- Olea & Pflueger (2013). *A Robust Test for Weak Instruments*. JBES.\n- Wooldridge (2010). *Econometric Analysis of Cross Section and Panel Data*.\n- DIME Analytics, [Reproducible Research](https:\u002F\u002Fdimewiki.worldbank.org\u002FReproducible_Research).\n- DIME Analytics, [Data Analysis](https:\u002F\u002Fdimewiki.worldbank.org\u002FData_Analysis).\n- pyfixest documentation: https:\u002F\u002Fpy-econometrics.github.io\u002Fpyfixest\u002F\n- linearmodels documentation: https:\u002F\u002Fbashtage.github.io\u002Flinearmodels\u002F\n",{"name":5,"risk":24,"source":25,"license":15,"version":26,"category":27,"description":7,"imported_at":28,"source_path":29,"source_repository":30,"disable-model-invocation":20},"low","https:\u002F\u002Fgithub.com\u002FJonasWeinert\u002FEconAgentSkills","1.0.0","economics","2026-09-20","_skills\u002Fanalysis\u002Fpython-panel-data\u002FSKILL.md","JonasWeinert\u002FEconAgentSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Feconomics\u002Fpython-panel-data","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill python-panel-data",{"tool":43,"command":44},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill python-panel-data",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill python-panel-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002FSKILL.md",true,[51,57,61,65,69,73,77],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"examples\u002Fbalance_table.py","SCRIPT","脚本",1871,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Fbalance_table.py",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"examples\u002Fclustered_inference.py",1906,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Fclustered_inference.py",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"examples\u002Fevent_study_sun_abraham.py",2093,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Fevent_study_sun_abraham.py",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"examples\u002Fiv_panel_pyfixest.py",1908,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Fiv_panel_pyfixest.py",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"examples\u002Ftwfe_linearmodels.py",1914,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Ftwfe_linearmodels.py",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"examples\u002Ftwfe_pyfixest.py",2127,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Fexamples\u002Ftwfe_pyfixest.py",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"reference.md","REFERENCE","参考文档",6478,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Feconomics\u002Fpython-panel-data\u002Freference.md",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]