@wentorai/research-plugins 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/curated/analysis/README.md +82 -56
- package/curated/domains/README.md +225 -69
- package/curated/literature/README.md +115 -46
- package/curated/research/README.md +106 -58
- package/curated/tools/README.md +107 -87
- package/curated/writing/README.md +92 -45
- package/mcp-configs/academic-db/alphafold-mcp.json +20 -0
- package/mcp-configs/academic-db/brightspace-mcp.json +21 -0
- package/mcp-configs/academic-db/climatiq-mcp.json +20 -0
- package/mcp-configs/academic-db/gibs-mcp.json +20 -0
- package/mcp-configs/academic-db/gis-mcp-server.json +22 -0
- package/mcp-configs/academic-db/google-earth-engine-mcp.json +21 -0
- package/mcp-configs/academic-db/m4-clinical-mcp.json +21 -0
- package/mcp-configs/academic-db/medical-mcp.json +21 -0
- package/mcp-configs/academic-db/nexonco-mcp.json +20 -0
- package/mcp-configs/academic-db/omop-mcp.json +20 -0
- package/mcp-configs/academic-db/onekgpd-mcp.json +20 -0
- package/mcp-configs/academic-db/openedu-mcp.json +20 -0
- package/mcp-configs/academic-db/opengenes-mcp.json +20 -0
- package/mcp-configs/academic-db/openstax-mcp.json +21 -0
- package/mcp-configs/academic-db/openstreetmap-mcp.json +21 -0
- package/mcp-configs/academic-db/opentargets-mcp.json +21 -0
- package/mcp-configs/academic-db/pdb-mcp.json +21 -0
- package/mcp-configs/academic-db/smithsonian-mcp.json +20 -0
- package/mcp-configs/ai-platform/magi-researchers.json +21 -0
- package/mcp-configs/ai-platform/mcp-academic-researcher.json +22 -0
- package/mcp-configs/ai-platform/open-paper-machine.json +21 -0
- package/mcp-configs/ai-platform/paper-intelligence.json +21 -0
- package/mcp-configs/ai-platform/paper-reader.json +21 -0
- package/mcp-configs/ai-platform/paperdebugger.json +21 -0
- package/mcp-configs/browser/exa-mcp.json +20 -0
- package/mcp-configs/browser/mcp-searxng.json +21 -0
- package/mcp-configs/browser/mcp-webresearch.json +20 -0
- package/mcp-configs/cloud-docs/confluence-mcp.json +37 -0
- package/mcp-configs/cloud-docs/google-drive-mcp.json +35 -0
- package/mcp-configs/cloud-docs/notion-mcp.json +29 -0
- package/mcp-configs/communication/discord-mcp.json +29 -0
- package/mcp-configs/communication/discourse-mcp.json +21 -0
- package/mcp-configs/communication/slack-mcp.json +29 -0
- package/mcp-configs/communication/telegram-mcp.json +28 -0
- package/mcp-configs/data-platform/automl-stat-mcp.json +21 -0
- package/mcp-configs/data-platform/jefferson-stats-mcp.json +22 -0
- package/mcp-configs/data-platform/mcp-excel-server.json +21 -0
- package/mcp-configs/data-platform/mcp-stata.json +21 -0
- package/mcp-configs/data-platform/mcpstack-jupyter.json +21 -0
- package/mcp-configs/data-platform/ml-mcp.json +21 -0
- package/mcp-configs/data-platform/nasdaq-data-link-mcp.json +20 -0
- package/mcp-configs/data-platform/numpy-mcp.json +21 -0
- package/mcp-configs/database/neo4j-mcp.json +37 -0
- package/mcp-configs/database/postgres-mcp.json +28 -0
- package/mcp-configs/database/sqlite-mcp.json +29 -0
- package/mcp-configs/dev-platform/geogebra-mcp.json +21 -0
- package/mcp-configs/dev-platform/github-mcp.json +31 -0
- package/mcp-configs/dev-platform/gitlab-mcp.json +34 -0
- package/mcp-configs/dev-platform/latex-mcp-server.json +21 -0
- package/mcp-configs/dev-platform/manim-mcp.json +20 -0
- package/mcp-configs/dev-platform/mcp-echarts.json +20 -0
- package/mcp-configs/dev-platform/panel-viz-mcp.json +20 -0
- package/mcp-configs/dev-platform/paperbanana.json +20 -0
- package/mcp-configs/dev-platform/texflow-mcp.json +20 -0
- package/mcp-configs/dev-platform/texmcp.json +20 -0
- package/mcp-configs/dev-platform/typst-mcp.json +21 -0
- package/mcp-configs/dev-platform/vizro-mcp.json +20 -0
- package/mcp-configs/email/email-mcp.json +40 -0
- package/mcp-configs/email/gmail-mcp.json +37 -0
- package/mcp-configs/note-knowledge/local-faiss-mcp.json +21 -0
- package/mcp-configs/note-knowledge/mcp-memory-service.json +21 -0
- package/mcp-configs/note-knowledge/mcp-obsidian.json +23 -0
- package/mcp-configs/note-knowledge/mcp-ragdocs.json +20 -0
- package/mcp-configs/note-knowledge/mcp-summarizer.json +21 -0
- package/mcp-configs/note-knowledge/mediawiki-mcp.json +21 -0
- package/mcp-configs/note-knowledge/openzim-mcp.json +20 -0
- package/mcp-configs/note-knowledge/zettelkasten-mcp.json +21 -0
- package/mcp-configs/reference-mgr/academic-paper-mcp-http.json +20 -0
- package/mcp-configs/reference-mgr/academix.json +20 -0
- package/mcp-configs/reference-mgr/arxiv-research-mcp.json +21 -0
- package/mcp-configs/reference-mgr/google-scholar-abstract-mcp.json +19 -0
- package/mcp-configs/reference-mgr/google-scholar-mcp.json +20 -0
- package/mcp-configs/reference-mgr/mcp-paperswithcode.json +21 -0
- package/mcp-configs/reference-mgr/mcp-scholarly.json +20 -0
- package/mcp-configs/reference-mgr/mcp-simple-arxiv.json +20 -0
- package/mcp-configs/reference-mgr/mcp-simple-pubmed.json +20 -0
- package/mcp-configs/reference-mgr/mcp-zotero.json +21 -0
- package/mcp-configs/reference-mgr/mendeley-mcp.json +20 -0
- package/mcp-configs/reference-mgr/ncbi-mcp-server.json +22 -0
- package/mcp-configs/reference-mgr/onecite.json +21 -0
- package/mcp-configs/reference-mgr/paper-search-mcp.json +21 -0
- package/mcp-configs/reference-mgr/pubmed-search-mcp.json +21 -0
- package/mcp-configs/reference-mgr/scholar-mcp.json +21 -0
- package/mcp-configs/reference-mgr/scholar-multi-mcp.json +21 -0
- package/mcp-configs/reference-mgr/seerai.json +21 -0
- package/mcp-configs/reference-mgr/semantic-scholar-fastmcp.json +21 -0
- package/mcp-configs/reference-mgr/sourcelibrary.json +20 -0
- package/mcp-configs/registry.json +178 -149
- package/mcp-configs/repository/dataverse-mcp.json +33 -0
- package/mcp-configs/repository/huggingface-mcp.json +29 -0
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -2
- package/skills/analysis/dataviz/algorithm-visualizer-guide/SKILL.md +259 -0
- package/skills/analysis/dataviz/bokeh-visualization-guide/SKILL.md +270 -0
- package/skills/analysis/dataviz/chart-image-generator/SKILL.md +229 -0
- package/skills/analysis/dataviz/citation-map-guide/SKILL.md +184 -0
- package/skills/analysis/dataviz/d3-visualization-guide/SKILL.md +281 -0
- package/skills/analysis/dataviz/data-visualization-principles/SKILL.md +171 -0
- package/skills/analysis/dataviz/echarts-visualization-guide/SKILL.md +250 -0
- package/skills/analysis/dataviz/metabase-analytics-guide/SKILL.md +242 -0
- package/skills/analysis/dataviz/plotly-interactive-guide/SKILL.md +266 -0
- package/skills/analysis/dataviz/redash-analytics-guide/SKILL.md +284 -0
- package/skills/analysis/econometrics/econml-causal-guide/SKILL.md +163 -0
- package/skills/analysis/econometrics/empirical-paper-analysis/SKILL.md +192 -0
- package/skills/analysis/econometrics/mostly-harmless-guide/SKILL.md +139 -0
- package/skills/analysis/econometrics/panel-data-analyst/SKILL.md +259 -0
- package/skills/analysis/econometrics/panel-data-regression-workflow/SKILL.md +267 -0
- package/skills/analysis/econometrics/python-causality-guide/SKILL.md +134 -0
- package/skills/analysis/econometrics/stata-accounting-guide/SKILL.md +269 -0
- package/skills/analysis/econometrics/stata-analyst-guide/SKILL.md +245 -0
- package/skills/analysis/econometrics/stata-reference-guide/SKILL.md +293 -0
- package/skills/analysis/statistics/data-anomaly-detection/SKILL.md +157 -0
- package/skills/analysis/statistics/general-statistics-guide/SKILL.md +226 -0
- package/skills/analysis/statistics/infiagent-benchmark-guide/SKILL.md +106 -0
- package/skills/analysis/statistics/ml-experiment-tracker/SKILL.md +212 -0
- package/skills/analysis/statistics/pywayne-statistics-guide/SKILL.md +192 -0
- package/skills/analysis/statistics/quantitative-methods-guide/SKILL.md +193 -0
- package/skills/analysis/statistics/senior-data-scientist-guide/SKILL.md +223 -0
- package/skills/analysis/wrangling/claude-data-analysis-guide/SKILL.md +100 -0
- package/skills/analysis/wrangling/csv-data-analyzer/SKILL.md +170 -0
- package/skills/analysis/wrangling/data-cleaning-pipeline/SKILL.md +266 -0
- package/skills/analysis/wrangling/data-cog-guide/SKILL.md +178 -0
- package/skills/analysis/wrangling/open-data-scientist-guide/SKILL.md +197 -0
- package/skills/analysis/wrangling/stata-data-cleaning/SKILL.md +276 -0
- package/skills/analysis/wrangling/streamline-analyst-guide/SKILL.md +119 -0
- package/skills/analysis/wrangling/survey-data-processing/SKILL.md +298 -0
- package/skills/domains/ai-ml/ai-agent-papers-guide/SKILL.md +146 -0
- package/skills/domains/ai-ml/ai-model-benchmarking/SKILL.md +209 -0
- package/skills/domains/ai-ml/annotated-dl-papers-guide/SKILL.md +159 -0
- package/skills/domains/ai-ml/anomaly-detection-papers-guide/SKILL.md +167 -0
- package/skills/domains/ai-ml/autonomous-agents-papers-guide/SKILL.md +178 -0
- package/skills/domains/ai-ml/dl-transformer-finetune/SKILL.md +239 -0
- package/skills/domains/ai-ml/domain-adaptation-papers-guide/SKILL.md +173 -0
- package/skills/domains/ai-ml/generative-ai-guide/SKILL.md +146 -0
- package/skills/domains/ai-ml/graph-learning-papers-guide/SKILL.md +125 -0
- package/skills/domains/ai-ml/huggingface-inference-guide/SKILL.md +196 -0
- package/skills/domains/ai-ml/keras-deep-learning/SKILL.md +210 -0
- package/skills/domains/ai-ml/kolmogorov-arnold-networks-guide/SKILL.md +185 -0
- package/skills/domains/ai-ml/llm-from-scratch-guide/SKILL.md +124 -0
- package/skills/domains/ai-ml/ml-pipeline-guide/SKILL.md +295 -0
- package/skills/domains/ai-ml/nlp-toolkit-guide/SKILL.md +247 -0
- package/skills/domains/ai-ml/npcpy-research-guide/SKILL.md +137 -0
- package/skills/domains/ai-ml/pytorch-guide/SKILL.md +281 -0
- package/skills/domains/ai-ml/pytorch-lightning-guide/SKILL.md +244 -0
- package/skills/domains/ai-ml/responsible-ai-guide/SKILL.md +126 -0
- package/skills/domains/ai-ml/tensorflow-guide/SKILL.md +241 -0
- package/skills/domains/ai-ml/vmas-simulator-guide/SKILL.md +129 -0
- package/skills/domains/biomedical/bioagents-guide/SKILL.md +308 -0
- package/skills/domains/biomedical/clawbio-guide/SKILL.md +167 -0
- package/skills/domains/biomedical/clinical-dialogue-agents-guide/SKILL.md +145 -0
- package/skills/domains/biomedical/ena-sequence-api/SKILL.md +175 -0
- package/skills/domains/biomedical/genomas-guide/SKILL.md +126 -0
- package/skills/domains/biomedical/genotex-benchmark-guide/SKILL.md +125 -0
- package/skills/domains/biomedical/med-researcher-guide/SKILL.md +161 -0
- package/skills/domains/biomedical/med-researcher-r1-guide/SKILL.md +146 -0
- package/skills/domains/biomedical/medgeclaw-guide/SKILL.md +345 -0
- package/skills/domains/biomedical/medical-imaging-guide/SKILL.md +305 -0
- package/skills/domains/biomedical/ncbi-blast-api/SKILL.md +195 -0
- package/skills/domains/biomedical/ncbi-datasets-api/SKILL.md +220 -0
- package/skills/domains/biomedical/quickgo-api/SKILL.md +181 -0
- package/skills/domains/business/architecture-design-guide/SKILL.md +279 -0
- package/skills/domains/business/innovation-management-guide/SKILL.md +257 -0
- package/skills/domains/business/operations-research-guide/SKILL.md +258 -0
- package/skills/domains/business/xpert-bi-guide/SKILL.md +84 -0
- package/skills/domains/chemistry/cactus-cheminformatics-guide/SKILL.md +89 -0
- package/skills/domains/chemistry/chemeagle-guide/SKILL.md +147 -0
- package/skills/domains/chemistry/chemgraph-agent-guide/SKILL.md +120 -0
- package/skills/domains/chemistry/molecular-dynamics-guide/SKILL.md +237 -0
- package/skills/domains/chemistry/pubchem-api-guide/SKILL.md +180 -0
- package/skills/domains/chemistry/spectroscopy-analysis-guide/SKILL.md +290 -0
- package/skills/domains/cs/ai-security-papers-guide/SKILL.md +103 -0
- package/skills/domains/cs/code-llm-papers-guide/SKILL.md +131 -0
- package/skills/domains/cs/distributed-systems-guide/SKILL.md +268 -0
- package/skills/domains/cs/formal-verification-guide/SKILL.md +298 -0
- package/skills/domains/cs/gaussian-splatting-papers-guide/SKILL.md +158 -0
- package/skills/domains/cs/llm-aiops-guide/SKILL.md +70 -0
- package/skills/domains/cs/software-heritage-api/SKILL.md +200 -0
- package/skills/domains/ecology/species-distribution-guide/SKILL.md +343 -0
- package/skills/domains/economics/imf-data-api-guide/SKILL.md +174 -0
- package/skills/domains/economics/nber-working-papers-api/SKILL.md +177 -0
- package/skills/domains/economics/post-labor-economics/SKILL.md +254 -0
- package/skills/domains/economics/pricing-psychology-guide/SKILL.md +273 -0
- package/skills/domains/economics/repec-economics-api/SKILL.md +188 -0
- package/skills/domains/economics/world-bank-data-guide/SKILL.md +179 -0
- package/skills/domains/education/academic-study-methods/SKILL.md +228 -0
- package/skills/domains/education/assessment-design-guide/SKILL.md +213 -0
- package/skills/domains/education/educational-research-methods/SKILL.md +179 -0
- package/skills/domains/education/edumcp-guide/SKILL.md +74 -0
- package/skills/domains/education/mooc-analytics-guide/SKILL.md +206 -0
- package/skills/domains/education/open-syllabus-api/SKILL.md +171 -0
- package/skills/domains/finance/akshare-finance-data/SKILL.md +207 -0
- package/skills/domains/finance/finsight-research-guide/SKILL.md +113 -0
- package/skills/domains/finance/options-analytics-agent-guide/SKILL.md +117 -0
- package/skills/domains/finance/portfolio-optimization-guide/SKILL.md +279 -0
- package/skills/domains/finance/risk-modeling-guide/SKILL.md +260 -0
- package/skills/domains/finance/stata-accounting-research/SKILL.md +372 -0
- package/skills/domains/geoscience/climate-modeling-guide/SKILL.md +215 -0
- package/skills/domains/geoscience/pangaea-data-api/SKILL.md +197 -0
- package/skills/domains/geoscience/satellite-remote-sensing/SKILL.md +193 -0
- package/skills/domains/geoscience/seismology-data-guide/SKILL.md +208 -0
- package/skills/domains/humanities/digital-humanities-methods/SKILL.md +232 -0
- package/skills/domains/humanities/ethical-philosophy-guide/SKILL.md +244 -0
- package/skills/domains/humanities/history-research-guide/SKILL.md +260 -0
- package/skills/domains/humanities/political-history-guide/SKILL.md +241 -0
- package/skills/domains/law/caselaw-access-api/SKILL.md +149 -0
- package/skills/domains/law/legal-agent-skills-guide/SKILL.md +132 -0
- package/skills/domains/law/legal-nlp-guide/SKILL.md +236 -0
- package/skills/domains/law/legal-research-methods/SKILL.md +190 -0
- package/skills/domains/law/opencontracts-guide/SKILL.md +168 -0
- package/skills/domains/law/patent-analysis-guide/SKILL.md +257 -0
- package/skills/domains/law/regulatory-compliance-guide/SKILL.md +267 -0
- package/skills/domains/math/lean-theorem-proving-guide/SKILL.md +140 -0
- package/skills/domains/math/symbolic-computation-guide/SKILL.md +263 -0
- package/skills/domains/math/topology-data-analysis/SKILL.md +305 -0
- package/skills/domains/pharma/clinical-trial-design-guide/SKILL.md +271 -0
- package/skills/domains/pharma/drug-target-interaction/SKILL.md +242 -0
- package/skills/domains/pharma/madd-drug-discovery-guide/SKILL.md +153 -0
- package/skills/domains/pharma/pharmacovigilance-guide/SKILL.md +216 -0
- package/skills/domains/physics/astrophysics-data-guide/SKILL.md +305 -0
- package/skills/domains/physics/particle-physics-guide/SKILL.md +287 -0
- package/skills/domains/social-science/ipums-microdata-api/SKILL.md +211 -0
- package/skills/domains/social-science/network-analysis-guide/SKILL.md +310 -0
- package/skills/domains/social-science/psychology-research-guide/SKILL.md +270 -0
- package/skills/domains/social-science/sociology-research-guide/SKILL.md +238 -0
- package/skills/domains/social-science/sociology-research-methods/SKILL.md +181 -0
- package/skills/literature/discovery/arxiv-paper-monitoring/SKILL.md +233 -0
- package/skills/literature/discovery/paper-recommendation-guide/SKILL.md +120 -0
- package/skills/literature/discovery/papers-we-love-guide/SKILL.md +169 -0
- package/skills/literature/discovery/semantic-paper-radar/SKILL.md +144 -0
- package/skills/literature/discovery/zotero-arxiv-daily-guide/SKILL.md +94 -0
- package/skills/literature/fulltext/bioc-pmc-api/SKILL.md +146 -0
- package/skills/literature/fulltext/core-api-guide/SKILL.md +144 -0
- package/skills/literature/fulltext/dataverse-api/SKILL.md +215 -0
- package/skills/literature/fulltext/hal-archive-api/SKILL.md +218 -0
- package/skills/literature/fulltext/institutional-repository-guide/SKILL.md +212 -0
- package/skills/literature/fulltext/open-access-mining-guide/SKILL.md +341 -0
- package/skills/literature/fulltext/osf-api/SKILL.md +212 -0
- package/skills/literature/fulltext/pmc-ftp-bulk-download/SKILL.md +182 -0
- package/skills/literature/fulltext/zotero-ai-butler-guide/SKILL.md +166 -0
- package/skills/literature/fulltext/zotero-scihub-guide/SKILL.md +168 -0
- package/skills/literature/metadata/academic-paper-summarizer/SKILL.md +101 -0
- package/skills/literature/metadata/bibliometrix-guide/SKILL.md +164 -0
- package/skills/literature/metadata/crossref-event-data-api/SKILL.md +183 -0
- package/skills/literature/metadata/doi-content-negotiation/SKILL.md +202 -0
- package/skills/literature/metadata/orkg-api/SKILL.md +153 -0
- package/skills/literature/metadata/plumx-metrics-api/SKILL.md +188 -0
- package/skills/literature/metadata/ror-organization-api/SKILL.md +208 -0
- package/skills/literature/metadata/sophosia-reference-guide/SKILL.md +110 -0
- package/skills/literature/metadata/viaf-authority-api/SKILL.md +209 -0
- package/skills/literature/metadata/wikidata-api-guide/SKILL.md +156 -0
- package/skills/literature/metadata/zoplicate-dedup-guide/SKILL.md +147 -0
- package/skills/literature/metadata/zotero-actions-tags-guide/SKILL.md +212 -0
- package/skills/literature/metadata/zotmoov-guide/SKILL.md +120 -0
- package/skills/literature/metadata/zutilo-guide/SKILL.md +140 -0
- package/skills/literature/search/arxiv-batch-reporting/SKILL.md +133 -0
- package/skills/literature/search/arxiv-cli-tools/SKILL.md +172 -0
- package/skills/literature/search/arxiv-osiris/SKILL.md +199 -0
- package/skills/literature/search/arxiv-paper-processor/SKILL.md +141 -0
- package/skills/literature/search/baidu-scholar-guide/SKILL.md +110 -0
- package/skills/literature/search/base-academic-search/SKILL.md +196 -0
- package/skills/literature/search/chatpaper-guide/SKILL.md +122 -0
- package/skills/literature/search/citeseerx-api/SKILL.md +183 -0
- package/skills/literature/search/deep-literature-search/SKILL.md +149 -0
- package/skills/literature/search/deepgit-search-guide/SKILL.md +147 -0
- package/skills/literature/search/eric-education-api/SKILL.md +199 -0
- package/skills/literature/search/findpapers-guide/SKILL.md +177 -0
- package/skills/literature/search/ieee-xplore-api/SKILL.md +177 -0
- package/skills/literature/search/lens-scholarly-api/SKILL.md +211 -0
- package/skills/literature/search/multi-database-literature-search/SKILL.md +198 -0
- package/skills/literature/search/open-library-api/SKILL.md +196 -0
- package/skills/literature/search/open-semantic-search-guide/SKILL.md +190 -0
- package/skills/literature/search/openaire-api/SKILL.md +141 -0
- package/skills/literature/search/paper-search-mcp-guide/SKILL.md +107 -0
- package/skills/literature/search/papers-chat-guide/SKILL.md +194 -0
- package/skills/literature/search/pasa-paper-search-guide/SKILL.md +138 -0
- package/skills/literature/search/plos-open-access-api/SKILL.md +203 -0
- package/skills/literature/search/scielo-api/SKILL.md +182 -0
- package/skills/literature/search/share-research-api/SKILL.md +129 -0
- package/skills/literature/search/worldcat-search-api/SKILL.md +224 -0
- package/skills/research/automation/ai-scientist-v2-guide/SKILL.md +284 -0
- package/skills/research/automation/aim-experiment-guide/SKILL.md +234 -0
- package/skills/research/automation/claude-academic-workflow-guide/SKILL.md +202 -0
- package/skills/research/automation/coexist-ai-guide/SKILL.md +149 -0
- package/skills/research/automation/datagen-research-guide/SKILL.md +131 -0
- package/skills/research/automation/foam-agent-guide/SKILL.md +203 -0
- package/skills/research/automation/kedro-pipeline-guide/SKILL.md +216 -0
- package/skills/research/automation/mle-agent-guide/SKILL.md +139 -0
- package/skills/research/automation/paper-to-agent-guide/SKILL.md +116 -0
- package/skills/research/automation/rd-agent-guide/SKILL.md +246 -0
- package/skills/research/automation/research-paper-orchestrator/SKILL.md +254 -0
- package/skills/research/deep-research/academic-deep-research/SKILL.md +190 -0
- package/skills/research/deep-research/auto-deep-research-guide/SKILL.md +141 -0
- package/skills/research/deep-research/cognitive-kernel-guide/SKILL.md +200 -0
- package/skills/research/deep-research/corvus-research-guide/SKILL.md +132 -0
- package/skills/research/deep-research/deep-research-pro/SKILL.md +213 -0
- package/skills/research/deep-research/deep-research-work/SKILL.md +204 -0
- package/skills/research/deep-research/deep-searcher-guide/SKILL.md +253 -0
- package/skills/research/deep-research/gpt-researcher-guide/SKILL.md +191 -0
- package/skills/research/deep-research/in-depth-research-guide/SKILL.md +205 -0
- package/skills/research/deep-research/khoj-research-guide/SKILL.md +200 -0
- package/skills/research/deep-research/kosmos-scientist-guide/SKILL.md +185 -0
- package/skills/research/deep-research/llm-scientific-discovery-guide/SKILL.md +178 -0
- package/skills/research/deep-research/local-deep-research-guide/SKILL.md +253 -0
- package/skills/research/deep-research/open-researcher-guide/SKILL.md +138 -0
- package/skills/research/deep-research/tongyi-deep-research-guide/SKILL.md +217 -0
- package/skills/research/funding/eu-horizon-guide/SKILL.md +244 -0
- package/skills/research/funding/grant-budget-guide/SKILL.md +284 -0
- package/skills/research/funding/nih-reporter-api-guide/SKILL.md +166 -0
- package/skills/research/funding/nsf-award-api-guide/SKILL.md +133 -0
- package/skills/research/methodology/academic-mentor-guide/SKILL.md +169 -0
- package/skills/research/methodology/claude-scientific-guide/SKILL.md +122 -0
- package/skills/research/methodology/deep-innovator-guide/SKILL.md +242 -0
- package/skills/research/methodology/osf-api-guide/SKILL.md +165 -0
- package/skills/research/methodology/parsifal-slr-guide/SKILL.md +154 -0
- package/skills/research/methodology/research-paper-kb/SKILL.md +263 -0
- package/skills/research/methodology/research-pipeline-units-guide/SKILL.md +169 -0
- package/skills/research/methodology/research-town-guide/SKILL.md +263 -0
- package/skills/research/methodology/slr-automation-guide/SKILL.md +235 -0
- package/skills/research/paper-review/automated-review-guide/SKILL.md +281 -0
- package/skills/research/paper-review/latte-review-guide/SKILL.md +175 -0
- package/skills/research/paper-review/paper-compare-guide/SKILL.md +238 -0
- package/skills/research/paper-review/paper-critique-framework/SKILL.md +181 -0
- package/skills/research/paper-review/paper-digest-guide/SKILL.md +240 -0
- package/skills/research/paper-review/paper-research-assistant/SKILL.md +231 -0
- package/skills/research/paper-review/research-quality-filter/SKILL.md +261 -0
- package/skills/research/paper-review/review-response-guide/SKILL.md +275 -0
- package/skills/tools/code-exec/contextplus-mcp-guide/SKILL.md +110 -0
- package/skills/tools/code-exec/google-colab-guide/SKILL.md +276 -0
- package/skills/tools/code-exec/kaggle-api-guide/SKILL.md +216 -0
- package/skills/tools/code-exec/overleaf-cli-guide/SKILL.md +279 -0
- package/skills/tools/diagram/clawphd-guide/SKILL.md +149 -0
- package/skills/tools/diagram/code-flow-visualizer/SKILL.md +197 -0
- package/skills/tools/diagram/excalidraw-diagram-guide/SKILL.md +170 -0
- package/skills/tools/diagram/json-data-visualizer/SKILL.md +270 -0
- package/skills/tools/diagram/kroki-diagram-api/SKILL.md +198 -0
- package/skills/tools/diagram/mermaid-architect-guide/SKILL.md +219 -0
- package/skills/tools/diagram/scientific-graphical-abstract/SKILL.md +201 -0
- package/skills/tools/diagram/tldraw-whiteboard-guide/SKILL.md +397 -0
- package/skills/tools/document/docsgpt-guide/SKILL.md +130 -0
- package/skills/tools/document/large-document-reader/SKILL.md +202 -0
- package/skills/tools/document/md2pdf-xelatex/SKILL.md +212 -0
- package/skills/tools/document/openpaper-guide/SKILL.md +232 -0
- package/skills/tools/document/paper-parse-guide/SKILL.md +243 -0
- package/skills/tools/document/weknora-guide/SKILL.md +216 -0
- package/skills/tools/document/zotero-addon-market-guide/SKILL.md +108 -0
- package/skills/tools/document/zotero-night-theme-guide/SKILL.md +142 -0
- package/skills/tools/document/zotero-style-guide/SKILL.md +217 -0
- package/skills/tools/knowledge-graph/citation-network-builder/SKILL.md +244 -0
- package/skills/tools/knowledge-graph/concept-map-generator/SKILL.md +284 -0
- package/skills/tools/knowledge-graph/graphiti-guide/SKILL.md +219 -0
- package/skills/tools/knowledge-graph/mimir-memory-guide/SKILL.md +135 -0
- package/skills/tools/knowledge-graph/notero-zotero-notion-guide/SKILL.md +187 -0
- package/skills/tools/knowledge-graph/open-webui-tools-guide/SKILL.md +156 -0
- package/skills/tools/knowledge-graph/openspg-guide/SKILL.md +210 -0
- package/skills/tools/knowledge-graph/paperpile-notion-guide/SKILL.md +84 -0
- package/skills/tools/knowledge-graph/zotero-markdb-connect-guide/SKILL.md +162 -0
- package/skills/tools/ocr-translate/latex-translation-guide/SKILL.md +176 -0
- package/skills/tools/ocr-translate/math-equation-renderer/SKILL.md +198 -0
- package/skills/tools/ocr-translate/pdf-math-translate-guide/SKILL.md +141 -0
- package/skills/tools/ocr-translate/zotero-pdf-translate-guide/SKILL.md +95 -0
- package/skills/tools/ocr-translate/zotero-pdf2zh-guide/SKILL.md +143 -0
- package/skills/tools/scraping/dataset-finder-guide/SKILL.md +253 -0
- package/skills/tools/scraping/easy-spider-guide/SKILL.md +250 -0
- package/skills/tools/scraping/google-scholar-scraper/SKILL.md +255 -0
- package/skills/tools/scraping/repository-harvesting-guide/SKILL.md +310 -0
- package/skills/writing/citation/academic-citation-manager/SKILL.md +314 -0
- package/skills/writing/citation/academic-citation-manager-guide/SKILL.md +182 -0
- package/skills/writing/citation/citation-assistant-skill/SKILL.md +192 -0
- package/skills/writing/citation/jabref-reference-guide/SKILL.md +127 -0
- package/skills/writing/citation/jasminum-zotero-guide/SKILL.md +103 -0
- package/skills/writing/citation/mendeley-api/SKILL.md +231 -0
- package/skills/writing/citation/obsidian-citation-guide/SKILL.md +164 -0
- package/skills/writing/citation/obsidian-zotero-guide/SKILL.md +137 -0
- package/skills/writing/citation/onecite-reference-guide/SKILL.md +168 -0
- package/skills/writing/citation/papersgpt-zotero-guide/SKILL.md +132 -0
- package/skills/writing/citation/papis-cli-guide/SKILL.md +213 -0
- package/skills/writing/citation/zotero-better-bibtex-guide/SKILL.md +107 -0
- package/skills/writing/citation/zotero-better-notes-guide/SKILL.md +121 -0
- package/skills/writing/citation/zotero-gpt-guide/SKILL.md +111 -0
- package/skills/writing/citation/zotero-mcp-guide/SKILL.md +164 -0
- package/skills/writing/citation/zotero-mdnotes-guide/SKILL.md +162 -0
- package/skills/writing/citation/zotero-reference-guide/SKILL.md +139 -0
- package/skills/writing/citation/zotero-scholar-guide/SKILL.md +294 -0
- package/skills/writing/citation/zotfile-attachment-guide/SKILL.md +140 -0
- package/skills/writing/composition/ml-paper-writing/SKILL.md +163 -0
- package/skills/writing/composition/opendraft-thesis-guide/SKILL.md +200 -0
- package/skills/writing/composition/paper-debugger-guide/SKILL.md +143 -0
- package/skills/writing/composition/paperforge-guide/SKILL.md +205 -0
- package/skills/writing/composition/research-paper-writer/SKILL.md +226 -0
- package/skills/writing/composition/scientific-writing-resources/SKILL.md +151 -0
- package/skills/writing/composition/scientific-writing-wrapper/SKILL.md +153 -0
- package/skills/writing/latex/academic-writing-latex/SKILL.md +285 -0
- package/skills/writing/latex/latex-drawing-collection/SKILL.md +154 -0
- package/skills/writing/latex/latex-templates-collection/SKILL.md +159 -0
- package/skills/writing/latex/md-to-pdf-academic/SKILL.md +230 -0
- package/skills/writing/latex/tex-render-guide/SKILL.md +243 -0
- package/skills/writing/polish/academic-tone-guide/SKILL.md +209 -0
- package/skills/writing/polish/chinese-text-humanizer/SKILL.md +140 -0
- package/skills/writing/polish/conciseness-editing-guide/SKILL.md +225 -0
- package/skills/writing/polish/paper-polish-guide/SKILL.md +160 -0
- package/skills/writing/templates/arxiv-preprint-template/SKILL.md +184 -0
- package/skills/writing/templates/elegant-paper-template/SKILL.md +141 -0
- package/skills/writing/templates/graphical-abstract-guide/SKILL.md +183 -0
- package/skills/writing/templates/novathesis-guide/SKILL.md +152 -0
- package/skills/writing/templates/scientific-article-pdf/SKILL.md +261 -0
- package/skills/writing/templates/sjtuthesis-guide/SKILL.md +197 -0
- package/skills/writing/templates/thuthesis-guide/SKILL.md +181 -0
- package/skills/literature/fulltext/repository-harvesting-guide/SKILL.md +0 -207
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: panel-data-analyst
|
|
3
|
+
description: "Expert panel data regression analysis with fixed effects and GMM"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "grid"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "econometrics"
|
|
9
|
+
keywords: ["panel data", "fixed effects", "random effects", "GMM", "dynamic panel", "Hausman test"]
|
|
10
|
+
source: "https://www.stata.com/manuals/xt.pdf"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Panel Data Analyst
|
|
14
|
+
|
|
15
|
+
Perform expert-level panel data regression analysis including fixed effects, random effects, dynamic panel models (Arellano-Bond/Blundell-Bond GMM), and advanced diagnostic tests. This skill covers the full workflow from panel setup through model selection, estimation, and publication-ready reporting.
|
|
16
|
+
|
|
17
|
+
## Overview
|
|
18
|
+
|
|
19
|
+
Panel data -- repeated observations on the same cross-sectional units over time -- is the workhorse of modern empirical economics, finance, political science, and management research. Panel methods exploit both cross-sectional and temporal variation, enabling researchers to control for unobserved heterogeneity that would bias ordinary cross-sectional estimates.
|
|
20
|
+
|
|
21
|
+
The choice between fixed effects, random effects, and dynamic panel estimators depends on the data structure, the nature of unobserved heterogeneity, and the identifying assumptions the researcher is willing to make. This skill provides a systematic decision framework and implementation in both Stata and R, with emphasis on the diagnostic tests that justify model selection.
|
|
22
|
+
|
|
23
|
+
Beyond basic FE/RE models, this skill covers the advanced techniques increasingly required by journal reviewers: instrumental variables within panel frameworks, Driscoll-Kraay standard errors for cross-sectional dependence, correlated random effects (Mundlak/Chamberlain), and system GMM for dynamic panels with endogenous regressors.
|
|
24
|
+
|
|
25
|
+
## Panel Data Setup
|
|
26
|
+
|
|
27
|
+
### Declaring Panel Structure
|
|
28
|
+
|
|
29
|
+
```stata
|
|
30
|
+
* Stata panel setup
|
|
31
|
+
xtset firm_id year
|
|
32
|
+
xtset // Verify panel structure
|
|
33
|
+
|
|
34
|
+
* Check panel balance
|
|
35
|
+
xtdescribe
|
|
36
|
+
* Shows: min/max/avg observations per panel, gaps
|
|
37
|
+
|
|
38
|
+
* Summary statistics by panel dimension
|
|
39
|
+
xtsum revenue profit employees rnd_spending
|
|
40
|
+
* Reports overall, between, and within variation
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Panel Diagnostics
|
|
44
|
+
|
|
45
|
+
```stata
|
|
46
|
+
* Check for gaps in panel
|
|
47
|
+
xtset firm_id year
|
|
48
|
+
gen gap = year - l.year if l.year != .
|
|
49
|
+
tab gap // Should be all 1's for balanced annual panels
|
|
50
|
+
|
|
51
|
+
* Create balanced subsample
|
|
52
|
+
by firm_id: gen T_i = _N
|
|
53
|
+
tab T_i
|
|
54
|
+
keep if T_i == max_T // Keep only units observed in all periods
|
|
55
|
+
|
|
56
|
+
* Attrition analysis
|
|
57
|
+
gen in_panel = 1
|
|
58
|
+
xtset firm_id year
|
|
59
|
+
tsfill, full
|
|
60
|
+
replace in_panel = 0 if missing(in_panel)
|
|
61
|
+
reg in_panel l.revenue l.profit l.size, cluster(firm_id)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Fixed Effects vs. Random Effects
|
|
65
|
+
|
|
66
|
+
### Fixed Effects Estimation
|
|
67
|
+
|
|
68
|
+
```stata
|
|
69
|
+
* Within estimator (entity fixed effects)
|
|
70
|
+
xtreg profit revenue rnd_spending employees i.year, fe robust
|
|
71
|
+
estimates store fe_model
|
|
72
|
+
|
|
73
|
+
* Entity and time fixed effects
|
|
74
|
+
reghdfe profit revenue rnd_spending employees, ///
|
|
75
|
+
absorb(firm_id year) cluster(firm_id)
|
|
76
|
+
estimates store twoway_fe
|
|
77
|
+
|
|
78
|
+
* First-differences (alternative to within estimator)
|
|
79
|
+
reg d.profit d.revenue d.rnd_spending d.employees i.year, ///
|
|
80
|
+
cluster(firm_id)
|
|
81
|
+
estimates store fd_model
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Random Effects Estimation
|
|
85
|
+
|
|
86
|
+
```stata
|
|
87
|
+
* GLS random effects
|
|
88
|
+
xtreg profit revenue rnd_spending employees i.year, re robust
|
|
89
|
+
estimates store re_model
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Hausman Test for Model Selection
|
|
93
|
+
|
|
94
|
+
```stata
|
|
95
|
+
* Classic Hausman test
|
|
96
|
+
xtreg profit revenue rnd_spending employees, fe
|
|
97
|
+
estimates store fe_haus
|
|
98
|
+
xtreg profit revenue rnd_spending employees, re
|
|
99
|
+
estimates store re_haus
|
|
100
|
+
hausman fe_haus re_haus
|
|
101
|
+
|
|
102
|
+
* Robust Hausman test (preferred with heteroskedasticity)
|
|
103
|
+
* Mundlak (1978) approach: add group means to RE model
|
|
104
|
+
foreach var of varlist revenue rnd_spending employees {
|
|
105
|
+
bysort firm_id: egen m_`var' = mean(`var')
|
|
106
|
+
}
|
|
107
|
+
xtreg profit revenue rnd_spending employees ///
|
|
108
|
+
m_revenue m_rnd_spending m_employees i.year, re cluster(firm_id)
|
|
109
|
+
test m_revenue m_rnd_spending m_employees
|
|
110
|
+
* Rejection => FE preferred; failure to reject => RE acceptable
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Dynamic Panel Models
|
|
114
|
+
|
|
115
|
+
### Arellano-Bond GMM (Difference GMM)
|
|
116
|
+
|
|
117
|
+
```stata
|
|
118
|
+
* When the lagged dependent variable is a regressor:
|
|
119
|
+
* y_it = alpha * y_{i,t-1} + X_it * beta + mu_i + epsilon_it
|
|
120
|
+
|
|
121
|
+
* Difference GMM (Arellano & Bond 1991)
|
|
122
|
+
xtabond profit l.profit revenue rnd_spending employees, ///
|
|
123
|
+
lags(1) twostep robust artests(2)
|
|
124
|
+
|
|
125
|
+
* Diagnostics
|
|
126
|
+
* AR(1) should be significant, AR(2) should NOT be significant
|
|
127
|
+
* Hansen J test of overidentifying restrictions (p > 0.10 desired)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### System GMM (Blundell-Bond)
|
|
131
|
+
|
|
132
|
+
```stata
|
|
133
|
+
* System GMM (Blundell & Bond 1998)
|
|
134
|
+
* More efficient than difference GMM, especially with persistent series
|
|
135
|
+
|
|
136
|
+
xtabond2 profit l.profit revenue rnd_spending employees i.year, ///
|
|
137
|
+
gmm(l.profit, lag(2 4) collapse) ///
|
|
138
|
+
gmm(revenue rnd_spending, lag(2 3) collapse) ///
|
|
139
|
+
iv(employees i.year) ///
|
|
140
|
+
twostep robust orthogonal small
|
|
141
|
+
|
|
142
|
+
* Key diagnostics to report:
|
|
143
|
+
* 1. Number of instruments (should not exceed number of groups)
|
|
144
|
+
* 2. Hansen J test p-value (> 0.10, but < 0.25 preferred -- not too high)
|
|
145
|
+
* 3. AR(2) test p-value (> 0.10 for valid instruments)
|
|
146
|
+
* 4. Difference-in-Hansen test for subset of instruments
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### GMM Diagnostic Checklist
|
|
150
|
+
|
|
151
|
+
| Test | Null Hypothesis | Desired Result | Stata Command |
|
|
152
|
+
|------|----------------|----------------|---------------|
|
|
153
|
+
| AR(1) | No first-order autocorrelation | Reject (p < 0.05) | Reported automatically |
|
|
154
|
+
| AR(2) | No second-order autocorrelation | Fail to reject (p > 0.10) | Reported automatically |
|
|
155
|
+
| Hansen J | Instruments are valid | Fail to reject (p > 0.10) | Reported automatically |
|
|
156
|
+
| Diff-in-Hansen | Level instruments valid | Fail to reject (p > 0.10) | Reported automatically |
|
|
157
|
+
| Instrument count | -- | N_instruments < N_groups | Check output |
|
|
158
|
+
|
|
159
|
+
## Standard Error Options
|
|
160
|
+
|
|
161
|
+
### Choosing the Right Standard Errors
|
|
162
|
+
|
|
163
|
+
```stata
|
|
164
|
+
* Entity-clustered (default choice for firm panels)
|
|
165
|
+
xtreg profit revenue rnd_spending, fe cluster(firm_id)
|
|
166
|
+
|
|
167
|
+
* Two-way clustering (firm and year)
|
|
168
|
+
reghdfe profit revenue rnd_spending, ///
|
|
169
|
+
absorb(firm_id) cluster(firm_id year)
|
|
170
|
+
|
|
171
|
+
* Driscoll-Kraay standard errors (cross-sectional dependence)
|
|
172
|
+
xtscc profit revenue rnd_spending i.year, fe lag(3)
|
|
173
|
+
|
|
174
|
+
* Newey-West within panels (autocorrelation + heteroskedasticity)
|
|
175
|
+
xtreg profit revenue rnd_spending, fe
|
|
176
|
+
xtpcse profit revenue rnd_spending i.firm_id, correlation(ar1)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Diagnostic Tests for Standard Error Selection
|
|
180
|
+
|
|
181
|
+
```stata
|
|
182
|
+
* Test for heteroskedasticity in FE model
|
|
183
|
+
xtreg profit revenue rnd_spending, fe
|
|
184
|
+
xttest3 // Modified Wald test (rejects => use robust/cluster SE)
|
|
185
|
+
|
|
186
|
+
* Test for serial correlation
|
|
187
|
+
xtserial profit revenue rnd_spending
|
|
188
|
+
* Wooldridge test (rejects => use cluster SE or Newey-West)
|
|
189
|
+
|
|
190
|
+
* Test for cross-sectional dependence
|
|
191
|
+
xtreg profit revenue rnd_spending, fe
|
|
192
|
+
xtcsd, pesaran abs
|
|
193
|
+
* Pesaran CD test (rejects => consider Driscoll-Kraay SE)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Advanced Specifications
|
|
197
|
+
|
|
198
|
+
### Interaction Effects in Panel Models
|
|
199
|
+
|
|
200
|
+
```stata
|
|
201
|
+
* Continuous x continuous interaction with FE
|
|
202
|
+
xtreg profit c.rnd_spending##c.market_share i.year, fe cluster(firm_id)
|
|
203
|
+
|
|
204
|
+
* Visualize marginal effect
|
|
205
|
+
margins, dydx(rnd_spending) at(market_share=(0(0.1)1))
|
|
206
|
+
marginsplot, title("Marginal Effect of R&D by Market Share")
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Instrumental Variables in Panel Data
|
|
210
|
+
|
|
211
|
+
```stata
|
|
212
|
+
* IV with fixed effects (xtivreg)
|
|
213
|
+
xtivreg profit (rnd_spending = tax_credit regulatory_change) ///
|
|
214
|
+
employees size i.year, fe first
|
|
215
|
+
|
|
216
|
+
* First-stage F-statistic check
|
|
217
|
+
* Report Kleibergen-Paap rk Wald F for weak instruments
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Correlated Random Effects (Mundlak)
|
|
221
|
+
|
|
222
|
+
```stata
|
|
223
|
+
* Mundlak (1978) approach: include within-group means
|
|
224
|
+
foreach var of varlist revenue rnd_spending employees {
|
|
225
|
+
bysort firm_id: egen bar_`var' = mean(`var')
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
xtreg profit revenue rnd_spending employees ///
|
|
229
|
+
bar_revenue bar_rnd_spending bar_employees ///
|
|
230
|
+
i.year, re cluster(firm_id)
|
|
231
|
+
|
|
232
|
+
* Coefficients on time-varying vars are equivalent to FE estimates
|
|
233
|
+
* Coefficients on bar_ vars capture between-unit effects
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Publication Tables
|
|
237
|
+
|
|
238
|
+
```stata
|
|
239
|
+
* Comparison table: FE vs RE vs GMM
|
|
240
|
+
esttab fe_model re_model gmm_model using "tables/panel_comparison.tex", ///
|
|
241
|
+
b(3) se(3) star(* 0.10 ** 0.05 *** 0.01) ///
|
|
242
|
+
label title("Panel Regression Results") ///
|
|
243
|
+
mtitles("Fixed Effects" "Random Effects" "System GMM") ///
|
|
244
|
+
stats(N N_g r2_w ar2p hansenp, ///
|
|
245
|
+
labels("Observations" "Firms" "Within R-squared" ///
|
|
246
|
+
"AR(2) p-value" "Hansen p-value") ///
|
|
247
|
+
fmt(0 0 3 3 3)) ///
|
|
248
|
+
addnotes("Clustered standard errors in parentheses." ///
|
|
249
|
+
"All models include year fixed effects.") ///
|
|
250
|
+
replace
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## References
|
|
254
|
+
|
|
255
|
+
- Wooldridge, J.M. (2010), Econometric Analysis of Cross Section and Panel Data, 2nd ed., MIT Press
|
|
256
|
+
- Arellano & Bond (1991), "Some Tests of Specification for Panel Data," RES 58(2)
|
|
257
|
+
- Blundell & Bond (1998), "Initial Conditions and Moment Restrictions in Dynamic Panel Data Models," JoE 87(1)
|
|
258
|
+
- Roodman (2009), "How to Do xtabond2: An Introduction to Difference and System GMM in Stata," SJ 9(1)
|
|
259
|
+
- Cameron & Trivedi (2005), Microeconometrics: Methods and Applications, Cambridge University Press
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: panel-data-regression-workflow
|
|
3
|
+
description: "Reproducible panel data regression workflow in Python and Stata"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "📊"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "econometrics"
|
|
9
|
+
keywords: ["panel data", "fixed effects", "regression workflow", "python econometrics", "stata", "reproducible research"]
|
|
10
|
+
source: "https://skillsmp.com/skills/panel-data-regression-analyst"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Panel Data Regression Workflow
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Panel data (longitudinal data) tracks multiple entities over time, enabling researchers to control for unobserved heterogeneity. This guide provides a complete, reproducible workflow for panel data regression — from data preparation through estimation to reporting — in both Python and Stata. It covers fixed effects, random effects, model selection, and diagnostics.
|
|
18
|
+
|
|
19
|
+
## Step 1: Data Structure and Setup
|
|
20
|
+
|
|
21
|
+
### Panel Data Format
|
|
22
|
+
|
|
23
|
+
Panel data should be in **long format** with one row per entity-time observation:
|
|
24
|
+
|
|
25
|
+
| entity_id | year | outcome | treatment | control_1 | control_2 |
|
|
26
|
+
|-----------|------|---------|-----------|-----------|-----------|
|
|
27
|
+
| firm_001 | 2018 | 45.2 | 0 | 12.3 | 0.8 |
|
|
28
|
+
| firm_001 | 2019 | 48.7 | 0 | 13.1 | 0.9 |
|
|
29
|
+
| firm_001 | 2020 | 52.1 | 1 | 14.0 | 0.7 |
|
|
30
|
+
| firm_002 | 2018 | 31.0 | 0 | 8.5 | 1.2 |
|
|
31
|
+
| ... | ... | ... | ... | ... | ... |
|
|
32
|
+
|
|
33
|
+
### Python Setup
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import pandas as pd
|
|
37
|
+
import numpy as np
|
|
38
|
+
from linearmodels.panel import PanelOLS, RandomEffects, BetweenOLS, compare
|
|
39
|
+
import statsmodels.api as sm
|
|
40
|
+
|
|
41
|
+
# Load and set panel structure
|
|
42
|
+
df = pd.read_csv("panel_data.csv")
|
|
43
|
+
df = df.set_index(["entity_id", "year"])
|
|
44
|
+
|
|
45
|
+
# Check balance
|
|
46
|
+
balance = df.groupby("entity_id").size()
|
|
47
|
+
print(f"Balanced: {balance.nunique() == 1}")
|
|
48
|
+
print(f"Entities: {df.index.get_level_values(0).nunique()}")
|
|
49
|
+
print(f"Periods: {df.index.get_level_values(1).nunique()}")
|
|
50
|
+
print(f"Observations: {len(df)}")
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Stata Setup
|
|
54
|
+
|
|
55
|
+
```stata
|
|
56
|
+
* Declare panel structure
|
|
57
|
+
xtset entity_id year
|
|
58
|
+
|
|
59
|
+
* Check balance
|
|
60
|
+
xtdescribe
|
|
61
|
+
xtsum outcome treatment control_1 control_2
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Step 2: Exploratory Panel Analysis
|
|
65
|
+
|
|
66
|
+
### Within and Between Variation
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
# Decompose variation
|
|
70
|
+
entity_means = df.groupby("entity_id")["outcome"].transform("mean")
|
|
71
|
+
time_means = df.groupby("year")["outcome"].transform("mean")
|
|
72
|
+
grand_mean = df["outcome"].mean()
|
|
73
|
+
|
|
74
|
+
df["within_var"] = df["outcome"] - entity_means
|
|
75
|
+
df["between_var"] = entity_means - grand_mean
|
|
76
|
+
|
|
77
|
+
print(f"Total variance: {df['outcome'].var():.4f}")
|
|
78
|
+
print(f"Within variance: {df['within_var'].var():.4f}")
|
|
79
|
+
print(f"Between variance: {df['between_var'].var():.4f}")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```stata
|
|
83
|
+
* Stata: within/between decomposition
|
|
84
|
+
xtsum outcome treatment control_1 control_2
|
|
85
|
+
* Reports Overall, Between, and Within standard deviations
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Visual Diagnostics
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
import matplotlib.pyplot as plt
|
|
92
|
+
|
|
93
|
+
# Entity-specific time trends (spaghetti plot)
|
|
94
|
+
fig, ax = plt.subplots(figsize=(10, 6))
|
|
95
|
+
for entity, group in df.groupby("entity_id"):
|
|
96
|
+
ax.plot(group.index.get_level_values("year"), group["outcome"],
|
|
97
|
+
alpha=0.3, color="steelblue")
|
|
98
|
+
ax.set_xlabel("Year")
|
|
99
|
+
ax.set_ylabel("Outcome")
|
|
100
|
+
ax.set_title("Entity-Level Outcome Trajectories")
|
|
101
|
+
plt.tight_layout()
|
|
102
|
+
plt.savefig("panel_trajectories.png", dpi=150)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Step 3: Estimation
|
|
106
|
+
|
|
107
|
+
### Fixed Effects (Within Estimator)
|
|
108
|
+
|
|
109
|
+
Controls for all time-invariant unobserved entity characteristics:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
# Python: Entity fixed effects
|
|
113
|
+
model_fe = PanelOLS(
|
|
114
|
+
df["outcome"],
|
|
115
|
+
df[["treatment", "control_1", "control_2"]],
|
|
116
|
+
entity_effects=True,
|
|
117
|
+
time_effects=True, # two-way FE
|
|
118
|
+
check_rank=True
|
|
119
|
+
)
|
|
120
|
+
result_fe = model_fe.fit(cov_type="clustered", cluster_entity=True)
|
|
121
|
+
print(result_fe.summary)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```stata
|
|
125
|
+
* Stata: Entity + time fixed effects with clustered SEs
|
|
126
|
+
xtreg outcome treatment control_1 control_2 i.year, fe cluster(entity_id)
|
|
127
|
+
|
|
128
|
+
* Or using reghdfe (absorbs high-dimensional FE efficiently)
|
|
129
|
+
reghdfe outcome treatment control_1 control_2, absorb(entity_id year) cluster(entity_id)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Random Effects (GLS)
|
|
133
|
+
|
|
134
|
+
Assumes unobserved effects are uncorrelated with regressors:
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
# Python: Random effects
|
|
138
|
+
model_re = RandomEffects(
|
|
139
|
+
df["outcome"],
|
|
140
|
+
df[["treatment", "control_1", "control_2"]]
|
|
141
|
+
)
|
|
142
|
+
result_re = model_re.fit(cov_type="clustered", cluster_entity=True)
|
|
143
|
+
print(result_re.summary)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```stata
|
|
147
|
+
* Stata: Random effects
|
|
148
|
+
xtreg outcome treatment control_1 control_2, re cluster(entity_id)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Step 4: Model Selection
|
|
152
|
+
|
|
153
|
+
### Hausman Test (FE vs RE)
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
# Python: manual Hausman test
|
|
157
|
+
from scipy import stats
|
|
158
|
+
|
|
159
|
+
b_fe = result_fe.params
|
|
160
|
+
b_re = result_re.params
|
|
161
|
+
common = b_fe.index.intersection(b_re.index)
|
|
162
|
+
|
|
163
|
+
diff = b_fe[common] - b_re[common]
|
|
164
|
+
cov_diff = result_fe.cov[common].loc[common] - result_re.cov[common].loc[common]
|
|
165
|
+
|
|
166
|
+
hausman_stat = float(diff @ np.linalg.inv(cov_diff) @ diff)
|
|
167
|
+
p_value = 1 - stats.chi2.cdf(hausman_stat, df=len(common))
|
|
168
|
+
print(f"Hausman statistic: {hausman_stat:.4f}")
|
|
169
|
+
print(f"p-value: {p_value:.4f}")
|
|
170
|
+
print(f"Decision: {'Fixed Effects' if p_value < 0.05 else 'Random Effects'}")
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```stata
|
|
174
|
+
* Stata: Hausman test
|
|
175
|
+
quietly xtreg outcome treatment control_1 control_2, fe
|
|
176
|
+
estimates store fe
|
|
177
|
+
quietly xtreg outcome treatment control_1 control_2, re
|
|
178
|
+
estimates store re
|
|
179
|
+
hausman fe re
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Interpretation**: p < 0.05 → FE preferred (RE assumption violated). In practice, most applied researchers default to FE for causal inference.
|
|
183
|
+
|
|
184
|
+
### Decision Framework
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
1. Is the key variable time-varying?
|
|
188
|
+
No → Cannot use FE (within estimator eliminates it)
|
|
189
|
+
Use RE, Correlated RE, or Between estimator
|
|
190
|
+
Yes → Continue
|
|
191
|
+
|
|
192
|
+
2. Hausman test significant?
|
|
193
|
+
Yes → Use Fixed Effects
|
|
194
|
+
No → RE is more efficient, but FE is still consistent
|
|
195
|
+
(many researchers use FE regardless for robustness)
|
|
196
|
+
|
|
197
|
+
3. Time effects needed?
|
|
198
|
+
Check: testparm i.year (Stata) or joint F-test
|
|
199
|
+
Significant → Include time FE (two-way)
|
|
200
|
+
|
|
201
|
+
4. Clustering level?
|
|
202
|
+
Cluster at the entity level (or higher if treatment varies at group level)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Step 5: Diagnostics
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
# Serial correlation test (Wooldridge)
|
|
209
|
+
# H₀: No first-order autocorrelation
|
|
210
|
+
from linearmodels.panel import PanelOLS
|
|
211
|
+
# Estimate first-differenced model and test residual autocorrelation
|
|
212
|
+
|
|
213
|
+
# Heteroscedasticity (Modified Wald test)
|
|
214
|
+
# If using clustered SEs, heteroscedasticity is already addressed
|
|
215
|
+
|
|
216
|
+
# Cross-sectional dependence (Pesaran CD test)
|
|
217
|
+
# Important for macro panels (country-level data)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```stata
|
|
221
|
+
* Stata: Wooldridge test for serial correlation
|
|
222
|
+
xtserial outcome treatment control_1 control_2
|
|
223
|
+
|
|
224
|
+
* Modified Wald test for heteroscedasticity in FE
|
|
225
|
+
xttest3
|
|
226
|
+
|
|
227
|
+
* Pesaran CD test for cross-sectional dependence
|
|
228
|
+
xtcd outcome treatment control_1 control_2
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Step 6: Reporting
|
|
232
|
+
|
|
233
|
+
### Publication Table
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
# Python: compare multiple specifications
|
|
237
|
+
from linearmodels.panel import compare
|
|
238
|
+
|
|
239
|
+
comparison = compare({
|
|
240
|
+
"OLS": result_ols,
|
|
241
|
+
"FE": result_fe,
|
|
242
|
+
"FE + Time": result_fe_time,
|
|
243
|
+
"RE": result_re
|
|
244
|
+
})
|
|
245
|
+
print(comparison.summary)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```stata
|
|
249
|
+
* Stata: publication-quality table
|
|
250
|
+
eststo clear
|
|
251
|
+
eststo: reg outcome treatment control_1 control_2, cluster(entity_id)
|
|
252
|
+
eststo: xtreg outcome treatment control_1 control_2, fe cluster(entity_id)
|
|
253
|
+
eststo: reghdfe outcome treatment control_1 control_2, absorb(entity_id year) cluster(entity_id)
|
|
254
|
+
eststo: xtreg outcome treatment control_1 control_2, re cluster(entity_id)
|
|
255
|
+
|
|
256
|
+
esttab, se star(* 0.10 ** 0.05 *** 0.01) ///
|
|
257
|
+
title("Panel Regression Results") label ///
|
|
258
|
+
mtitles("OLS" "FE" "Two-way FE" "RE") ///
|
|
259
|
+
scalars("r2 R-squared" "N Observations")
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## References
|
|
263
|
+
|
|
264
|
+
- Wooldridge, J. M. (2010). *Econometric Analysis of Cross Section and Panel Data* (2nd ed.). MIT Press.
|
|
265
|
+
- Cameron, A. C., & Trivedi, P. K. (2005). *Microeconometrics*. Cambridge University Press.
|
|
266
|
+
- [linearmodels Python Package](https://bashtage.github.io/linearmodels/)
|
|
267
|
+
- [reghdfe Stata Package](http://scorreia.com/software/reghdfe/)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-causality-guide
|
|
3
|
+
description: "Learn causal inference with Python using the Brave and True handbook"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "📊"
|
|
7
|
+
category: "analysis"
|
|
8
|
+
subcategory: "econometrics"
|
|
9
|
+
keywords: ["causal-inference", "python", "econometrics", "statistics", "treatment-effects", "observational-studies"]
|
|
10
|
+
source: "https://github.com/matheusfacure/python-causality-handbook"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Causal Inference for the Brave and True
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Causal Inference for the Brave and True is an open-source, Python-based textbook by Matheus Facure that teaches causal inference methods through practical implementations. The book bridges the gap between theoretical econometrics textbooks and hands-on data science practice, presenting each method with runnable Python code, real-world datasets, and intuitive explanations that demystify the mathematics behind causal reasoning.
|
|
18
|
+
|
|
19
|
+
The handbook covers the full spectrum of causal inference techniques used in modern empirical research, from foundational concepts like potential outcomes and directed acyclic graphs (DAGs) through advanced methods including instrumental variables, regression discontinuity, difference-in-differences, and synthetic control. Each chapter builds on the previous one, constructing a coherent framework for thinking about causation from observational data.
|
|
20
|
+
|
|
21
|
+
With over 3,000 GitHub stars, this resource has become a standard reference for graduate students, applied researchers, and data scientists seeking to add causal reasoning to their analytical toolkit. The emphasis on Python implementation makes it directly applicable to modern research workflows.
|
|
22
|
+
|
|
23
|
+
## Installation and Setup
|
|
24
|
+
|
|
25
|
+
The handbook runs as Jupyter notebooks. Set up the environment:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/matheusfacure/python-causality-handbook.git
|
|
29
|
+
cd python-causality-handbook
|
|
30
|
+
|
|
31
|
+
# Create a virtual environment
|
|
32
|
+
python -m venv causal-env
|
|
33
|
+
source causal-env/bin/activate
|
|
34
|
+
|
|
35
|
+
# Install dependencies
|
|
36
|
+
pip install numpy pandas matplotlib seaborn scikit-learn statsmodels
|
|
37
|
+
pip install linearmodels causalinference
|
|
38
|
+
pip install jupyter
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Launch the notebook server:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
jupyter notebook
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The chapters are organized as numbered Jupyter notebooks, starting from foundational concepts and progressing to advanced methods. Each notebook is self-contained with all data loading and analysis code included.
|
|
48
|
+
|
|
49
|
+
## Core Methods Covered
|
|
50
|
+
|
|
51
|
+
**Potential Outcomes Framework**: The book begins by establishing the Neyman-Rubin potential outcomes model, defining treatment effects and the fundamental problem of causal inference:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
import pandas as pd
|
|
55
|
+
import numpy as np
|
|
56
|
+
from scipy.stats import ttest_ind
|
|
57
|
+
|
|
58
|
+
# Estimate ATE from randomized experiment
|
|
59
|
+
treated = data[data["treatment"] == 1]["outcome"]
|
|
60
|
+
control = data[data["treatment"] == 0]["outcome"]
|
|
61
|
+
ate = treated.mean() - control.mean()
|
|
62
|
+
t_stat, p_value = ttest_ind(treated, control)
|
|
63
|
+
print(f"ATE: {ate:.3f}, p-value: {p_value:.4f}")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Regression and Matching**: OLS regression for causal estimation, understanding omitted variable bias, propensity score methods, and matching estimators:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
import statsmodels.formula.api as smf
|
|
70
|
+
|
|
71
|
+
# OLS with controls
|
|
72
|
+
model = smf.ols("outcome ~ treatment + age + income + education", data=data)
|
|
73
|
+
results = model.fit(cov_type="HC1")
|
|
74
|
+
print(results.summary().tables[1])
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Instrumental Variables**: Two-stage least squares and the local average treatment effect, with practical guidance on instrument validity and weak instrument diagnostics:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from linearmodels.iv import IV2SLS
|
|
81
|
+
|
|
82
|
+
# Two-stage least squares
|
|
83
|
+
iv_formula = "outcome ~ 1 + [treatment ~ instrument]"
|
|
84
|
+
iv_model = IV2SLS.from_formula(iv_formula, data=data)
|
|
85
|
+
iv_results = iv_model.fit(cov_type="robust")
|
|
86
|
+
print(iv_results.summary)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Difference-in-Differences**: Parallel trends assumption, two-way fixed effects, event study designs, and staggered treatment adoption:
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
# Difference-in-Differences with two-way fixed effects
|
|
93
|
+
did_model = smf.ols(
|
|
94
|
+
"outcome ~ treated_post + C(unit_id) + C(time_period)",
|
|
95
|
+
data=panel_data
|
|
96
|
+
)
|
|
97
|
+
did_results = did_model.fit(cov_type="cluster", cov_kwds={"groups": panel_data["unit_id"]})
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Regression Discontinuity**: Sharp and fuzzy RD designs, bandwidth selection, and local polynomial estimation for identifying causal effects at policy thresholds.
|
|
101
|
+
|
|
102
|
+
**Synthetic Control**: Constructing counterfactual units from donor pools for comparative case studies, with inference via placebo tests.
|
|
103
|
+
|
|
104
|
+
## Research Workflow Integration
|
|
105
|
+
|
|
106
|
+
**Graduate Coursework**: The handbook maps directly to applied econometrics and causal inference course syllabi. Students can follow along with lectures by running the corresponding notebooks, experimenting with parameter changes, and observing how different assumptions affect estimates.
|
|
107
|
+
|
|
108
|
+
**Method Selection Guide**: Use the decision framework presented across chapters to choose the appropriate method for your research question:
|
|
109
|
+
|
|
110
|
+
- Randomized experiment available: simple comparison of means or regression adjustment
|
|
111
|
+
- Selection on observables: matching, propensity scores, or regression
|
|
112
|
+
- Unobserved confounders with instrument: instrumental variables
|
|
113
|
+
- Policy threshold: regression discontinuity
|
|
114
|
+
- Before/after with control group: difference-in-differences
|
|
115
|
+
- Single treated unit over time: synthetic control
|
|
116
|
+
|
|
117
|
+
**Replication and Extension**: Each chapter uses real or realistic datasets. Researchers can adapt the code to their own data by replacing data loading steps while preserving the analytical pipeline.
|
|
118
|
+
|
|
119
|
+
**Teaching Tool**: Instructors can assign chapters as interactive homework, asking students to modify assumptions, change specifications, or apply methods to new datasets. The notebook format makes it straightforward to create assignments with embedded solutions.
|
|
120
|
+
|
|
121
|
+
## Best Practices Highlighted in the Handbook
|
|
122
|
+
|
|
123
|
+
1. **Always graph your data first**: Visual inspection reveals patterns that inform modeling choices and expose violations of identifying assumptions.
|
|
124
|
+
2. **Understand your identification strategy**: Before running any estimator, articulate clearly what variation identifies the causal effect and what assumptions are required.
|
|
125
|
+
3. **Cluster standard errors appropriately**: When treatment is assigned at group level, cluster standard errors at that level to avoid overstating statistical significance.
|
|
126
|
+
4. **Run robustness checks**: Vary specifications, bandwidths, control variables, and functional forms to assess sensitivity of conclusions.
|
|
127
|
+
5. **Report effect sizes alongside p-values**: Statistical significance without practical significance is not informative for policy or scientific understanding.
|
|
128
|
+
|
|
129
|
+
## References
|
|
130
|
+
|
|
131
|
+
- Python Causality Handbook: https://github.com/matheusfacure/python-causality-handbook
|
|
132
|
+
- Online version: https://matheusfacure.github.io/python-causality-handbook/
|
|
133
|
+
- Angrist and Pischke, Mostly Harmless Econometrics (companion reference)
|
|
134
|
+
- Cunningham, Causal Inference: The Mixtape (complementary resource)
|