@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,372 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stata-accounting-research
|
|
3
|
+
description: "STATA code patterns for empirical accounting and finance research"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "📒"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "finance"
|
|
9
|
+
keywords: ["STATA", "accounting", "empirical finance", "panel data", "earnings management", "audit"]
|
|
10
|
+
source: "https://github.com/stata-accounting/resources"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# STATA Accounting Research Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
Empirical accounting research relies heavily on STATA for data manipulation, statistical analysis, and robustness testing. The field has developed standardized methodological approaches -- earnings quality models, event studies, difference-in-differences for regulatory changes, and instrument variable strategies for endogeneity -- that are implemented in a relatively stable set of STATA patterns.
|
|
18
|
+
|
|
19
|
+
This guide provides the core STATA code patterns used in top accounting journals (The Accounting Review, Journal of Accounting Research, Journal of Accounting and Economics, and Review of Accounting Studies). These patterns are drawn from commonly used research designs in financial reporting, auditing, tax, and managerial accounting research.
|
|
20
|
+
|
|
21
|
+
Whether you are estimating discretionary accruals, conducting an event study around an earnings announcement, testing the effect of auditor rotation on audit quality, or implementing a regulatory shock analysis, these patterns provide tested, reviewable STATA implementations.
|
|
22
|
+
|
|
23
|
+
## Data Preparation
|
|
24
|
+
|
|
25
|
+
### Loading and Cleaning COMPUSTAT Data
|
|
26
|
+
|
|
27
|
+
```stata
|
|
28
|
+
* ============================================================
|
|
29
|
+
* COMPUSTAT Annual Data Preparation for Accounting Research
|
|
30
|
+
* Standard preparation used across most empirical accounting papers
|
|
31
|
+
* ============================================================
|
|
32
|
+
|
|
33
|
+
* Load COMPUSTAT annual data
|
|
34
|
+
use "compustat_annual.dta", clear
|
|
35
|
+
|
|
36
|
+
* Keep relevant variables
|
|
37
|
+
keep gvkey fyear datadate at sale cogs xsga dp ib oancf act lct che dlc ///
|
|
38
|
+
csho prcc_f ceq re dltt txp xrd ppegt ppent invt rect
|
|
39
|
+
|
|
40
|
+
* Set panel structure
|
|
41
|
+
destring gvkey, replace
|
|
42
|
+
xtset gvkey fyear
|
|
43
|
+
|
|
44
|
+
* --- Basic cleaning ---
|
|
45
|
+
* Drop financial firms (SIC 6000-6999) and utilities (SIC 4900-4999)
|
|
46
|
+
drop if inrange(sic, 6000, 6999) | inrange(sic, 4900, 4999)
|
|
47
|
+
|
|
48
|
+
* Require minimum observations
|
|
49
|
+
bysort gvkey: gen nobs = _N
|
|
50
|
+
drop if nobs < 3
|
|
51
|
+
drop nobs
|
|
52
|
+
|
|
53
|
+
* --- Generate common variables ---
|
|
54
|
+
* Total accruals (balance sheet approach)
|
|
55
|
+
gen total_accruals = (D.act - D.che) - (D.lct - D.dlc) - dp
|
|
56
|
+
|
|
57
|
+
* Total accruals (cash flow approach, preferred)
|
|
58
|
+
gen total_accruals_cf = ib - oancf
|
|
59
|
+
|
|
60
|
+
* Scale by lagged total assets
|
|
61
|
+
gen lag_at = L.at
|
|
62
|
+
gen ta_scaled = total_accruals_cf / lag_at
|
|
63
|
+
gen sale_scaled = sale / lag_at
|
|
64
|
+
gen ppe_scaled = ppent / lag_at
|
|
65
|
+
gen dsale = D.sale / lag_at
|
|
66
|
+
gen drec = D.rect / lag_at
|
|
67
|
+
gen roa = ib / lag_at
|
|
68
|
+
|
|
69
|
+
* Market value of equity
|
|
70
|
+
gen mve = csho * prcc_f
|
|
71
|
+
|
|
72
|
+
* Book-to-market ratio
|
|
73
|
+
gen btm = ceq / mve
|
|
74
|
+
|
|
75
|
+
* Leverage
|
|
76
|
+
gen leverage = (dlc + dltt) / at
|
|
77
|
+
|
|
78
|
+
* Firm size
|
|
79
|
+
gen size = ln(at)
|
|
80
|
+
|
|
81
|
+
* --- Winsorize at 1% and 99% ---
|
|
82
|
+
foreach var of varlist ta_scaled sale_scaled ppe_scaled roa btm leverage size {
|
|
83
|
+
winsor2 `var', replace cuts(1 99)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
* Label variables
|
|
87
|
+
label var ta_scaled "Total accruals / lagged assets"
|
|
88
|
+
label var roa "Return on assets"
|
|
89
|
+
label var btm "Book-to-market ratio"
|
|
90
|
+
label var leverage "Total debt / total assets"
|
|
91
|
+
label var size "Log(total assets)"
|
|
92
|
+
|
|
93
|
+
save "compustat_clean.dta", replace
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Earnings Quality Models
|
|
97
|
+
|
|
98
|
+
### Modified Jones Model (Dechow et al., 1995)
|
|
99
|
+
|
|
100
|
+
```stata
|
|
101
|
+
* ============================================================
|
|
102
|
+
* Modified Jones Model: Estimate discretionary accruals
|
|
103
|
+
* Standard model for earnings management research
|
|
104
|
+
* ============================================================
|
|
105
|
+
|
|
106
|
+
use "compustat_clean.dta", clear
|
|
107
|
+
|
|
108
|
+
* --- Step 1: Estimate non-discretionary accruals by industry-year ---
|
|
109
|
+
* Jones (1991) model estimated cross-sectionally
|
|
110
|
+
|
|
111
|
+
gen inv_lag_at = 1 / lag_at
|
|
112
|
+
gen dsale_drec = dsale - drec // Modified Jones adjustment
|
|
113
|
+
|
|
114
|
+
* Estimate by 2-digit SIC and year (require >= 15 obs per group)
|
|
115
|
+
gen sic2 = floor(sic / 100)
|
|
116
|
+
|
|
117
|
+
* Cross-sectional estimation
|
|
118
|
+
gen da_mj = .
|
|
119
|
+
gen nda_mj = .
|
|
120
|
+
|
|
121
|
+
levelsof fyear, local(years)
|
|
122
|
+
foreach y of local years {
|
|
123
|
+
levelsof sic2 if fyear == `y', local(industries)
|
|
124
|
+
foreach ind of local industries {
|
|
125
|
+
* Count observations in this industry-year
|
|
126
|
+
count if sic2 == `ind' & fyear == `y' & !missing(ta_scaled, inv_lag_at, dsale_drec, ppe_scaled)
|
|
127
|
+
if r(N) >= 15 {
|
|
128
|
+
* Estimate Jones model
|
|
129
|
+
quietly reg ta_scaled inv_lag_at dsale_drec ppe_scaled ///
|
|
130
|
+
if sic2 == `ind' & fyear == `y', robust
|
|
131
|
+
|
|
132
|
+
* Predict non-discretionary accruals
|
|
133
|
+
quietly predict temp_nda if sic2 == `ind' & fyear == `y', xb
|
|
134
|
+
quietly replace nda_mj = temp_nda if sic2 == `ind' & fyear == `y'
|
|
135
|
+
drop temp_nda
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
* Discretionary accruals = Total accruals - Non-discretionary accruals
|
|
141
|
+
replace da_mj = ta_scaled - nda_mj
|
|
142
|
+
|
|
143
|
+
* Absolute discretionary accruals (common measure of earnings quality)
|
|
144
|
+
gen abs_da = abs(da_mj)
|
|
145
|
+
|
|
146
|
+
label var da_mj "Discretionary accruals (Modified Jones)"
|
|
147
|
+
label var abs_da "Absolute discretionary accruals"
|
|
148
|
+
|
|
149
|
+
save "accruals_data.dta", replace
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Performance-Matched Discretionary Accruals (Kothari et al., 2005)
|
|
153
|
+
|
|
154
|
+
```stata
|
|
155
|
+
* ============================================================
|
|
156
|
+
* Kothari (2005): Performance-matched discretionary accruals
|
|
157
|
+
* Controls for correlation between performance and accruals
|
|
158
|
+
* ============================================================
|
|
159
|
+
|
|
160
|
+
* Add ROA to the Jones model
|
|
161
|
+
gen da_kothari = .
|
|
162
|
+
|
|
163
|
+
levelsof fyear, local(years)
|
|
164
|
+
foreach y of local years {
|
|
165
|
+
levelsof sic2 if fyear == `y', local(industries)
|
|
166
|
+
foreach ind of local industries {
|
|
167
|
+
count if sic2 == `ind' & fyear == `y' & !missing(ta_scaled, inv_lag_at, dsale_drec, ppe_scaled, roa)
|
|
168
|
+
if r(N) >= 15 {
|
|
169
|
+
quietly reg ta_scaled inv_lag_at dsale_drec ppe_scaled roa ///
|
|
170
|
+
if sic2 == `ind' & fyear == `y', robust
|
|
171
|
+
quietly predict temp_res if sic2 == `ind' & fyear == `y', residuals
|
|
172
|
+
quietly replace da_kothari = temp_res if sic2 == `ind' & fyear == `y'
|
|
173
|
+
drop temp_res
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
gen abs_da_kothari = abs(da_kothari)
|
|
179
|
+
label var da_kothari "Discretionary accruals (Kothari)"
|
|
180
|
+
label var abs_da_kothari "Absolute DA (Kothari)"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Event Study
|
|
184
|
+
|
|
185
|
+
```stata
|
|
186
|
+
* ============================================================
|
|
187
|
+
* Short-window event study around earnings announcements
|
|
188
|
+
* Standard methodology for capital markets research
|
|
189
|
+
* ============================================================
|
|
190
|
+
|
|
191
|
+
use "crsp_daily_returns.dta", clear
|
|
192
|
+
|
|
193
|
+
* Merge with event dates
|
|
194
|
+
merge m:1 gvkey fyear using "earnings_dates.dta", keep(match) nogen
|
|
195
|
+
|
|
196
|
+
* --- Estimation window: [-250, -30] relative to announcement ---
|
|
197
|
+
gen event_day = date - rdq // rdq = report date of quarterly earnings
|
|
198
|
+
keep if inrange(event_day, -250, 10)
|
|
199
|
+
|
|
200
|
+
* Estimate market model in estimation window
|
|
201
|
+
gen est_window = inrange(event_day, -250, -30)
|
|
202
|
+
gen event_window = inrange(event_day, -1, 1) // 3-day window [-1, +1]
|
|
203
|
+
|
|
204
|
+
* Market model: R_i = alpha + beta * R_m + epsilon
|
|
205
|
+
bysort permno fyear: egen has_enough = total(est_window)
|
|
206
|
+
keep if has_enough >= 100 // Require 100+ days in estimation window
|
|
207
|
+
|
|
208
|
+
* Estimate market model parameters
|
|
209
|
+
gen alpha = .
|
|
210
|
+
gen beta_mkt = .
|
|
211
|
+
|
|
212
|
+
levelsof permno, local(firms)
|
|
213
|
+
foreach p of local firms {
|
|
214
|
+
capture quietly reg ret mktrf if permno == `p' & est_window == 1
|
|
215
|
+
if _rc == 0 {
|
|
216
|
+
quietly replace alpha = _b[_cons] if permno == `p'
|
|
217
|
+
quietly replace beta_mkt = _b[mktrf] if permno == `p'
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
* Abnormal returns
|
|
222
|
+
gen ar = ret - (alpha + beta_mkt * mktrf)
|
|
223
|
+
|
|
224
|
+
* Cumulative abnormal returns [-1, +1]
|
|
225
|
+
bysort permno fyear (event_day): egen car_3day = total(ar) if event_window == 1
|
|
226
|
+
|
|
227
|
+
* Cross-sectional test
|
|
228
|
+
preserve
|
|
229
|
+
keep if event_day == 0
|
|
230
|
+
* t-test: Is average CAR different from zero?
|
|
231
|
+
ttest car_3day == 0
|
|
232
|
+
* Regression with controls
|
|
233
|
+
reg car_3day surprise size btm, robust
|
|
234
|
+
restore
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## Regression Specifications
|
|
238
|
+
|
|
239
|
+
### Standard Panel Regression with Fixed Effects
|
|
240
|
+
|
|
241
|
+
```stata
|
|
242
|
+
* ============================================================
|
|
243
|
+
* Standard regression specification for accounting research
|
|
244
|
+
* Includes firm and year fixed effects, clustered standard errors
|
|
245
|
+
* ============================================================
|
|
246
|
+
|
|
247
|
+
use "merged_analysis_data.dta", clear
|
|
248
|
+
|
|
249
|
+
* --- Main specification ---
|
|
250
|
+
* DV: Absolute discretionary accruals (earnings quality)
|
|
251
|
+
* Key IV: Big 4 auditor indicator
|
|
252
|
+
|
|
253
|
+
* Model 1: Pooled OLS (baseline, for comparison only)
|
|
254
|
+
reg abs_da big4 size leverage btm roa loss, robust
|
|
255
|
+
estimates store m1
|
|
256
|
+
|
|
257
|
+
* Model 2: Year fixed effects
|
|
258
|
+
reg abs_da big4 size leverage btm roa loss i.fyear, robust
|
|
259
|
+
estimates store m2
|
|
260
|
+
|
|
261
|
+
* Model 3: Industry + Year fixed effects
|
|
262
|
+
reg abs_da big4 size leverage btm roa loss i.sic2 i.fyear, robust
|
|
263
|
+
estimates store m3
|
|
264
|
+
|
|
265
|
+
* Model 4: Firm + Year fixed effects (preferred specification)
|
|
266
|
+
reghdfe abs_da big4 size leverage btm roa loss, absorb(gvkey fyear) ///
|
|
267
|
+
cluster(gvkey)
|
|
268
|
+
estimates store m4
|
|
269
|
+
|
|
270
|
+
* Model 5: Firm + Year FE, two-way clustering (firm and year)
|
|
271
|
+
reghdfe abs_da big4 size leverage btm roa loss, absorb(gvkey fyear) ///
|
|
272
|
+
cluster(gvkey fyear)
|
|
273
|
+
estimates store m5
|
|
274
|
+
|
|
275
|
+
* --- Output table ---
|
|
276
|
+
esttab m1 m2 m3 m4 m5 using "table_main.tex", replace ///
|
|
277
|
+
star(* 0.10 ** 0.05 *** 0.01) ///
|
|
278
|
+
b(%9.4f) se(%9.4f) ///
|
|
279
|
+
stats(N r2 r2_a, fmt(%9.0g %9.4f %9.4f) ///
|
|
280
|
+
labels("Observations" "R-squared" "Adj. R-squared")) ///
|
|
281
|
+
title("Effect of Auditor Type on Earnings Quality") ///
|
|
282
|
+
label booktabs
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Robustness Tests
|
|
286
|
+
|
|
287
|
+
### Propensity Score Matching
|
|
288
|
+
|
|
289
|
+
```stata
|
|
290
|
+
* ============================================================
|
|
291
|
+
* Propensity Score Matching (PSM) for endogeneity concerns
|
|
292
|
+
* Used when treatment assignment (e.g., Big 4 auditor) is not random
|
|
293
|
+
* ============================================================
|
|
294
|
+
|
|
295
|
+
* Step 1: Estimate propensity score
|
|
296
|
+
logit big4 size leverage btm roa loss age_firm, robust
|
|
297
|
+
predict pscore, pr
|
|
298
|
+
|
|
299
|
+
* Step 2: Common support check
|
|
300
|
+
gen cs = pscore >= 0.1 & pscore <= 0.9 // Trim extreme propensity scores
|
|
301
|
+
|
|
302
|
+
* Step 3: Nearest-neighbor matching (1:1, without replacement)
|
|
303
|
+
psmatch2 big4 size leverage btm roa loss if cs == 1, ///
|
|
304
|
+
outcome(abs_da) neighbor(1) caliper(0.01) common
|
|
305
|
+
|
|
306
|
+
* Check covariate balance after matching
|
|
307
|
+
pstest size leverage btm roa loss, both
|
|
308
|
+
|
|
309
|
+
* Step 4: Re-estimate on matched sample
|
|
310
|
+
gen matched = _weight != .
|
|
311
|
+
reg abs_da big4 size leverage btm roa loss if matched == 1, robust
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Heckman Selection Model
|
|
315
|
+
|
|
316
|
+
```stata
|
|
317
|
+
* ============================================================
|
|
318
|
+
* Heckman two-stage model for sample selection bias
|
|
319
|
+
* Example: Analyst coverage → Earnings quality
|
|
320
|
+
* ============================================================
|
|
321
|
+
|
|
322
|
+
* First stage: Selection equation (what determines analyst coverage?)
|
|
323
|
+
probit analyst_covered size btm roa institutional_ownership sp500 ///
|
|
324
|
+
exchange_listed, robust
|
|
325
|
+
|
|
326
|
+
* Second stage: Outcome equation with inverse Mills ratio
|
|
327
|
+
heckman abs_da analyst_covered size leverage btm roa, ///
|
|
328
|
+
select(analyst_covered = size btm roa institutional_ownership ///
|
|
329
|
+
sp500 exchange_listed) ///
|
|
330
|
+
twostep
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Publication-Ready Output
|
|
334
|
+
|
|
335
|
+
```stata
|
|
336
|
+
* ============================================================
|
|
337
|
+
* Generating publication-ready tables and statistics
|
|
338
|
+
* ============================================================
|
|
339
|
+
|
|
340
|
+
* Summary statistics table
|
|
341
|
+
estpost summarize abs_da big4 size leverage btm roa loss, detail
|
|
342
|
+
esttab using "table_sumstats.tex", replace ///
|
|
343
|
+
cells("count mean sd p25 p50 p75") ///
|
|
344
|
+
label booktabs title("Summary Statistics")
|
|
345
|
+
|
|
346
|
+
* Correlation matrix
|
|
347
|
+
pwcorr abs_da big4 size leverage btm roa, star(0.05) sig
|
|
348
|
+
estpost correlate abs_da big4 size leverage btm roa, matrix listwise
|
|
349
|
+
esttab using "table_corr.tex", replace unstack not noobs ///
|
|
350
|
+
label booktabs title("Correlation Matrix")
|
|
351
|
+
|
|
352
|
+
* Univariate comparison (treatment vs. control)
|
|
353
|
+
ttest abs_da, by(big4) unequal
|
|
354
|
+
ranksum abs_da, by(big4)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## Best Practices
|
|
358
|
+
|
|
359
|
+
- **Always cluster standard errors** by firm (at minimum) in panel data. Two-way clustering by firm and year is increasingly required by reviewers.
|
|
360
|
+
- **Use `reghdfe`** for high-dimensional fixed effects. It is faster and more memory-efficient than `areg` or `xtreg, fe`.
|
|
361
|
+
- **Report economic magnitude.** A one-standard-deviation change in X produces a Y% change in the dependent variable.
|
|
362
|
+
- **Include all robustness tests** that reviewers expect: PSM, Heckman, placebo tests, entropy balancing, and alternative variable definitions.
|
|
363
|
+
- **Winsorize at 1% and 99%** as a default; report results at 5%/95% as a robustness check.
|
|
364
|
+
- **Use `eststo` and `esttab`** for consistent, automated table generation. Never hand-type regression results.
|
|
365
|
+
|
|
366
|
+
## References
|
|
367
|
+
|
|
368
|
+
- Dechow, P. M., Sloan, R. G., & Sweeney, A. P. (1995). Detecting Earnings Management. The Accounting Review, 70(2), 193-225.
|
|
369
|
+
- Kothari, S. P., Leone, A. J., & Wasley, C. E. (2005). Performance Matched Discretionary Accrual Measures. Journal of Accounting and Economics, 39(1), 163-197.
|
|
370
|
+
- [WRDS (Wharton Research Data Services)](https://wrds-www.wharton.upenn.edu/) -- Standard data platform for accounting/finance research
|
|
371
|
+
- [reghdfe documentation](https://github.com/sergiocorreia/reghdfe) -- Fast fixed-effects estimation in STATA
|
|
372
|
+
- Gow, I. D., Ormazabal, G., & Taylor, D. J. (2010). Correcting for Cross-Sectional and Time-Series Dependence in Accounting Research. The Accounting Review, 85(2), 483-512.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: climate-modeling-guide
|
|
3
|
+
description: "Climate simulation, modeling tools, and climate data analysis methods"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "cloud"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "geoscience"
|
|
9
|
+
keywords: ["climate", "modeling", "simulation", "netcdf", "cmip", "atmosphere", "global-warming"]
|
|
10
|
+
source: "wentor"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Climate Modeling Guide
|
|
14
|
+
|
|
15
|
+
A skill for working with climate models and climate data in research contexts. Covers accessing CMIP archives, processing NetCDF data, running idealized climate simulations, statistical downscaling, and analyzing climate projections with Python tools.
|
|
16
|
+
|
|
17
|
+
## Climate Data Standards
|
|
18
|
+
|
|
19
|
+
### NetCDF and CF Conventions
|
|
20
|
+
|
|
21
|
+
Climate data is stored in NetCDF (Network Common Data Form) files following CF (Climate and Forecast) conventions:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import xarray as xr
|
|
25
|
+
import numpy as np
|
|
26
|
+
|
|
27
|
+
# Open a CMIP6 temperature dataset
|
|
28
|
+
ds = xr.open_dataset("tas_Amon_CESM2_ssp585_r1i1p1f1_gn_201501-210012.nc")
|
|
29
|
+
|
|
30
|
+
print(ds)
|
|
31
|
+
# Dimensions: (time: 1032, lat: 192, lon: 288)
|
|
32
|
+
# Variables: tas (surface air temperature, K)
|
|
33
|
+
# Attributes: CF-1.6 compliant, CMIP6 metadata
|
|
34
|
+
|
|
35
|
+
# Basic inspection
|
|
36
|
+
print(f"Variable: {ds.tas.long_name}")
|
|
37
|
+
print(f"Units: {ds.tas.units}")
|
|
38
|
+
print(f"Time range: {ds.time.values[0]} to {ds.time.values[-1]}")
|
|
39
|
+
print(f"Spatial resolution: {np.diff(ds.lat.values[:2])[0]:.2f} deg")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### CMIP6 Data Access
|
|
43
|
+
|
|
44
|
+
The Coupled Model Intercomparison Project Phase 6 provides standardized multi-model climate projections:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
# Using intake-esm to search the CMIP6 catalog
|
|
48
|
+
import intake
|
|
49
|
+
|
|
50
|
+
# Open the Pangeo CMIP6 catalog (cloud-hosted on Google Cloud)
|
|
51
|
+
url = "https://storage.googleapis.com/cmip6/pangeo-cmip6.json"
|
|
52
|
+
col = intake.open_esm_datastore(url)
|
|
53
|
+
|
|
54
|
+
# Search for monthly surface temperature under SSP5-8.5
|
|
55
|
+
query = col.search(
|
|
56
|
+
experiment_id="ssp585",
|
|
57
|
+
variable_id="tas",
|
|
58
|
+
table_id="Amon",
|
|
59
|
+
source_id=["CESM2", "GFDL-ESM4", "UKESM1-0-LL", "MPI-ESM1-2-HR"],
|
|
60
|
+
member_id="r1i1p1f1",
|
|
61
|
+
)
|
|
62
|
+
print(f"Found {len(query)} datasets from {query.nunique()['source_id']} models")
|
|
63
|
+
|
|
64
|
+
# Load as xarray datasets (lazy, Zarr-backed)
|
|
65
|
+
dsets = query.to_dataset_dict(zarr_kwargs={"consolidated": True})
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Climate Analysis Techniques
|
|
69
|
+
|
|
70
|
+
### Global Mean Temperature Anomaly
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
def compute_global_mean_anomaly(ds, baseline_start="1850-01-01",
|
|
74
|
+
baseline_end="1900-12-31"):
|
|
75
|
+
"""
|
|
76
|
+
Compute area-weighted global mean temperature anomaly
|
|
77
|
+
relative to a baseline period.
|
|
78
|
+
"""
|
|
79
|
+
# Area weighting by cosine of latitude
|
|
80
|
+
weights = np.cos(np.deg2rad(ds.lat))
|
|
81
|
+
weights.name = "weights"
|
|
82
|
+
|
|
83
|
+
# Weighted global mean time series
|
|
84
|
+
global_mean = ds.tas.weighted(weights).mean(dim=["lat", "lon"])
|
|
85
|
+
|
|
86
|
+
# Compute baseline climatology
|
|
87
|
+
baseline = global_mean.sel(time=slice(baseline_start, baseline_end))
|
|
88
|
+
climatology = baseline.groupby("time.month").mean("time")
|
|
89
|
+
|
|
90
|
+
# Compute anomalies
|
|
91
|
+
anomaly = global_mean.groupby("time.month") - climatology
|
|
92
|
+
|
|
93
|
+
# Annual mean anomaly
|
|
94
|
+
annual_anomaly = anomaly.resample(time="YE").mean()
|
|
95
|
+
return annual_anomaly
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def multi_model_ensemble(datasets: dict, baseline_period: tuple):
|
|
99
|
+
"""
|
|
100
|
+
Compute multi-model ensemble mean and spread for temperature projections.
|
|
101
|
+
datasets: dict of {model_name: xarray.Dataset}
|
|
102
|
+
Returns ensemble mean and 5th/95th percentile bounds.
|
|
103
|
+
"""
|
|
104
|
+
anomalies = []
|
|
105
|
+
for name, ds in datasets.items():
|
|
106
|
+
anom = compute_global_mean_anomaly(ds, *baseline_period)
|
|
107
|
+
anom = anom.assign_coords(model=name)
|
|
108
|
+
anomalies.append(anom)
|
|
109
|
+
|
|
110
|
+
ensemble = xr.concat(anomalies, dim="model")
|
|
111
|
+
return {
|
|
112
|
+
"mean": ensemble.mean(dim="model"),
|
|
113
|
+
"p05": ensemble.quantile(0.05, dim="model"),
|
|
114
|
+
"p95": ensemble.quantile(0.95, dim="model"),
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Climate Indices
|
|
119
|
+
|
|
120
|
+
Standard indices used in climate research:
|
|
121
|
+
|
|
122
|
+
| Index | Full Name | Definition |
|
|
123
|
+
|-------|-----------|-----------|
|
|
124
|
+
| ENSO (Nino3.4) | El Nino Southern Oscillation | SST anomaly in 5S-5N, 170W-120W |
|
|
125
|
+
| NAO | North Atlantic Oscillation | SLP difference Iceland - Azores |
|
|
126
|
+
| PDO | Pacific Decadal Oscillation | Leading PC of North Pacific SST |
|
|
127
|
+
| AMO | Atlantic Multidecadal Oscillation | Detrended North Atlantic SST |
|
|
128
|
+
| IOD | Indian Ocean Dipole | SST difference western - eastern Indian Ocean |
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
def compute_nino34(sst_dataset, baseline="1991-01-01/2020-12-31"):
|
|
132
|
+
"""Compute Nino 3.4 index from SST data."""
|
|
133
|
+
# Select Nino 3.4 region
|
|
134
|
+
nino34_region = sst_dataset.tos.sel(
|
|
135
|
+
lat=slice(-5, 5), lon=slice(190, 240)
|
|
136
|
+
)
|
|
137
|
+
# Area-weighted mean
|
|
138
|
+
weights = np.cos(np.deg2rad(nino34_region.lat))
|
|
139
|
+
nino34_ts = nino34_region.weighted(weights).mean(dim=["lat", "lon"])
|
|
140
|
+
|
|
141
|
+
# Remove monthly climatology
|
|
142
|
+
clim = nino34_ts.sel(time=slice(*baseline.split("/"))).groupby("time.month").mean()
|
|
143
|
+
nino34_index = nino34_ts.groupby("time.month") - clim
|
|
144
|
+
|
|
145
|
+
# 5-month running mean for standard definition
|
|
146
|
+
nino34_smoothed = nino34_index.rolling(time=5, center=True).mean()
|
|
147
|
+
return nino34_smoothed
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Statistical Downscaling
|
|
151
|
+
|
|
152
|
+
### Bias Correction and Spatial Disaggregation
|
|
153
|
+
|
|
154
|
+
Global climate models (GCMs) typically have 50-200 km resolution, too coarse for impact studies. Statistical downscaling bridges this gap:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
def quantile_mapping(obs: np.ndarray, model_hist: np.ndarray,
|
|
158
|
+
model_future: np.ndarray, n_quantiles: int = 100):
|
|
159
|
+
"""
|
|
160
|
+
Quantile mapping bias correction.
|
|
161
|
+
Maps model quantiles to observed quantiles for bias correction.
|
|
162
|
+
"""
|
|
163
|
+
quantiles = np.linspace(0, 1, n_quantiles + 1)
|
|
164
|
+
obs_q = np.quantile(obs, quantiles)
|
|
165
|
+
hist_q = np.quantile(model_hist, quantiles)
|
|
166
|
+
|
|
167
|
+
# For each future value, find its quantile in historical distribution
|
|
168
|
+
# then map to corresponding observed quantile
|
|
169
|
+
corrected = np.interp(model_future, hist_q, obs_q)
|
|
170
|
+
return corrected
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Downscaling Methods Comparison
|
|
174
|
+
|
|
175
|
+
| Method | Type | Advantages | Limitations |
|
|
176
|
+
|--------|------|-----------|-------------|
|
|
177
|
+
| Quantile mapping | Statistical | Simple, preserves distribution | Assumes stationarity |
|
|
178
|
+
| BCSD | Statistical | Preserves spatial patterns | Limited for extremes |
|
|
179
|
+
| Delta method | Statistical | Very simple | Only shifts mean |
|
|
180
|
+
| WRF (dynamical) | Physical | Physically consistent | Computationally expensive |
|
|
181
|
+
| DeepSD (deep learning) | Hybrid | Learns complex patterns | Requires large training data |
|
|
182
|
+
|
|
183
|
+
## Running Climate Models
|
|
184
|
+
|
|
185
|
+
### Simple Energy Balance Model
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
def energy_balance_model(S0=1361, albedo=0.30, emissivity=0.612):
|
|
189
|
+
"""
|
|
190
|
+
Zero-dimensional energy balance model.
|
|
191
|
+
S0: solar constant (W/m2)
|
|
192
|
+
albedo: planetary albedo
|
|
193
|
+
emissivity: effective atmospheric emissivity
|
|
194
|
+
Returns equilibrium surface temperature (K).
|
|
195
|
+
"""
|
|
196
|
+
sigma = 5.67e-8 # Stefan-Boltzmann constant
|
|
197
|
+
# Absorbed solar radiation
|
|
198
|
+
absorbed = S0 * (1 - albedo) / 4
|
|
199
|
+
# Surface temperature with greenhouse effect
|
|
200
|
+
T_surface = (absorbed / (emissivity * sigma)) ** 0.25
|
|
201
|
+
return T_surface
|
|
202
|
+
|
|
203
|
+
T_eq = energy_balance_model()
|
|
204
|
+
print(f"Equilibrium surface temperature: {T_eq:.1f} K ({T_eq - 273.15:.1f} C)")
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Tools and Resources
|
|
208
|
+
|
|
209
|
+
- **xarray + dask**: Scalable multi-dimensional climate data analysis
|
|
210
|
+
- **CDO (Climate Data Operators)**: Command-line NetCDF processing
|
|
211
|
+
- **NCO (NetCDF Operators)**: File manipulation and arithmetic
|
|
212
|
+
- **CESM (Community Earth System Model)**: Full-complexity coupled GCM
|
|
213
|
+
- **Pangeo**: Cloud-native geoscience data analysis ecosystem
|
|
214
|
+
- **ESMValTool**: Community diagnostic and performance metrics for ESMs
|
|
215
|
+
- **ClimateData.ca / Copernicus CDS**: Processed climate projection portals
|