{"id":"3a148cfc-5d1c-429d-aa3e-99b2acb12a77","shortId":"gPQwyv","kind":"skill","title":"stata-accounting-research","tagline":"STATA code pattern library for empirical archival accounting research. Provides tested syntax from 126 peer-reviewed JAR (Journal of Accounting Research) replication files (2017-2025). Use when the user asks procedural questions like \"How do I implement [method]?\" or \"Show me cod","description":"## Scope and Limitations\n\nThis skill is a **code pattern library**, not a methodological advisor.\n\n| Can Do | Cannot Do |\n|--------|-----------|\n| Show *how* published papers implemented methods | Explain *when* to use one method over another |\n| Provide tested STATA syntax | Advise on identification strategy |\n| Indicate which robustness tests accompany analyses | Discuss research design trade-offs |\n| Cite source papers for code patterns | Recommend optimal research design |\n\n**When users ask methodology questions** (e.g., \"Should I use entropy balancing or PSM?\", \"How do I address endogeneity?\", \"Is my identification strategy valid?\"):\n\n1. Acknowledge the limitation: \"This skill provides code patterns from published papers, not research design guidance.\"\n2. Show how different papers approached similar problems (code examples)\n3. Suggest consulting methodology references: Breuer & deHaan (2024) for fixed effects, Angrist & Pischke for causal inference, or the user's methodologist/advisor\n4. Offer to show multiple implementations so the user can see variation in approaches\n\n## Workflow\n\nUse `references/REFERENCES.md` as the primary index, then read targeted .do files.\n\n### Stage 1: Index Search\n\nSearch `references/REFERENCES.md` to identify relevant papers. The index contains structured metadata:\n- **Primary Method**: STATA commands used (reghdfe, psmatch2, stcox, etc.)\n- **Identification Strategy**: DiD, PSM, IV, RDD, Event Study, etc.\n- **Robustness/Special Features**: Winsorization levels, clustering specs, placebo tests, etc.\n\nExample queries on REFERENCES.md:\n- \"entropy balancing\" → finds JAR_60_alv, JAR_60_bl, JAR_61_ds, JAR_62_5_llz, JAR_63_2_npstv\n- \"stacked DiD\" → finds JAR_61_ds, JAR_62_5_aov, JAR_62_5_gibbons\n- \"Cox hazard\" → finds JAR_59_ctv, JAR_62_2_xyz\n\n### Stage 2: Code Extraction\n\nRead only the identified .do files to extract actual syntax. This reduces context usage and improves accuracy.\n\n### Stage 3: Adaptation and Citation\n\n1. Adapt patterns to the user's variable names and research context\n2. Cite source: \"Based on [Authors] ([Year]), JAR [Volume]([Issue])\"\n\n## Fallback: Direct Grep Patterns\n\nFor very specific syntax queries (e.g., \"how does absorb() handle singletons?\"), grep .do files directly:\n\n| Task | Grep Pattern |\n|------|--------------|\n| Panel regressions | `reghdfe\\|xtreg\\|areg` |\n| Fixed effects | `absorb\\(\\|i\\.year\\|i\\.firm` |\n| Clustering | `cluster\\(\\|vce\\(cluster` |\n| Matching/PSM | `psmatch2\\|teffects\\|cem\\|ebalance\\|pscore` |\n| IV regression | `xtivreg\\|ivregress\\|ivreg2` |\n| DiD | `post.*treat\\|treat.*post\\|parallel.*trend` |\n| RDD | `rdrobust\\|rddensity` |\n| Event studies | `CAR\\|BHAR\\|abnormal.*return` |\n| Survival | `stcox\\|streg\\|stset` |\n| Fama-MacBeth | `fama.?macbeth\\|newey.*west` |\n| Bootstrap | `bootstrap\\|bsample` |\n| Quantile regression | `qreg\\|sqreg\\|bsqreg` |\n| Table output | `esttab\\|outreg2\\|eststo` |\n| Winsorization | `winsor\\|winsor2` |\n\n## Corpus Overview\n\n126 STATA .do files from JAR Volumes 55-63 (2017-2025). See `references/REFERENCES.md` for complete catalog with paper titles and authors.\n\n### File Naming Convention\n\n- V55-61: `JAR_{volume}_{shortcode}.do`\n- V62-63: `JAR_{volume}_{issue}_{shortcode}_{authors}.do`\n\n### Volume Coverage\n\n| Volume | Year | Papers |\n|--------|------|--------|\n| 55 | 2017 | 9 |\n| 56 | 2018 | 12 |\n| 57 | 2019 | 9 |\n| 58 | 2020 | 13 |\n| 59 | 2021 | 4 |\n| 60 | 2022 | 22 |\n| 61 | 2023 | 22 |\n| 62 | 2024 | 25 |\n| 63 | 2025 | 10 |\n\n## Standard Patterns\n\n### Clustering and Fixed Effects\n\n```stata\n* Firm and year FE with firm-clustered SEs (most common)\nreghdfe depvar indepvar controls, absorb(firm year) cluster(firm)\n\n* Industry-year FE\nreghdfe depvar indepvar controls, absorb(ind_year) cluster(firm)\n```\n\n### Output Conventions\n\n```stata\neststo clear\neststo: reghdfe depvar indepvar controls, absorb(firm year) cluster(firm)\nesttab using \"table.tex\", replace star(* 0.10 ** 0.05 *** 0.01) se\n```\n\n### Winsorization\n\n```stata\nwinsor2 varlist, cuts(1 99) replace\n```","tags":["jusi","aalto","stata","accounting","research","awesome","agent","skills","for","empirical","brycewang-stanford","academic-research"],"capabilities":["skill","source-brycewang-stanford","skill-18-jusi-aalto-stata-accounting-research","topic-academic-research","topic-agent-skills","topic-ai-agent","topic-awesome-list","topic-communication","topic-copaper","topic-economics","topic-education","topic-empirical-research","topic-international-relations","topic-political-science","topic-psychology"],"categories":["Awesome-Agent-Skills-for-Empirical-Research"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research/18-jusi-aalto-stata-accounting-research","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research","source_repo":"https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 598 github stars · SKILL.md body (4,017 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T12:52:56.134Z","embedding":null,"createdAt":"2026-04-18T22:12:43.003Z","updatedAt":"2026-05-02T12:52:56.134Z","lastSeenAt":"2026-05-02T12:52:56.134Z","tsv":"'-2025':30,448 '-61':463 '-63':446,469 '0.01':570 '0.05':569 '0.10':568 '1':133,207,322,577 '10':507 '12':486 '126':18,438 '13':492 '2':149,270,294,297,334 '2017':29,447,482 '2018':485 '2019':488 '2020':491 '2021':494 '2022':497 '2023':500 '2024':166,503 '2025':506 '22':498,501 '25':504 '3':159,318 '4':180,495 '5':266,280,284 '55':445,481 '56':484 '57':487 '58':490 '59':290,493 '60':256,259,496 '61':262,276,499 '62':265,279,283,293,502 '63':269,505 '9':483,489 '99':578 'abnorm':407 'absorb':356,373,530,543,558 'accompani':92 'account':3,12,25 'accuraci':316 'acknowledg':134 'actual':308 'adapt':319,323 'address':126 'advis':84 'advisor':61 'alv':257 'analys':93 'angrist':170 'anoth':79 'aov':281 'approach':154,193 'archiv':11 'areg':370 'ask':35,112 'author':339,458,474 'balanc':120,253 'base':337 'bhar':406 'bl':260 'bootstrap':420,421 'breuer':164 'bsampl':422 'bsqreg':427 'cannot':64 'car':405 'catalog':453 'causal':173 'cem':385 'citat':321 'cite':100,335 'clear':552 'cluster':243,378,379,381,510,522,533,546,561 'cod':47 'code':6,55,104,140,157,298 'command':224 'common':525 'complet':452 'consult':161 'contain':218 'context':312,333 'control':529,542,557 'convent':461,549 'corpus':436 'coverag':477 'cox':286 'ctv':291 'cut':576 'dehaan':165 'depvar':527,540,555 'design':96,109,147 'differ':152 'direct':345,362 'discuss':94 'ds':263,277 'e.g':115,353 'ebal':386 'effect':169,372,513 'empir':10 'endogen':127 'entropi':119,252 'eststo':432,551,553 'esttab':430,563 'etc':229,238,247 'event':236,403 'exampl':158,248 'explain':72 'extract':299,307 'fallback':344 'fama':414,416 'fama-macbeth':413 'fe':518,538 'featur':240 'file':28,205,305,361,441,459 'find':254,274,288 'firm':377,515,521,531,534,547,559,562 'firm-clust':520 'fix':168,371,512 'gibbon':285 'grep':346,359,364 'guidanc':148 'handl':357 'hazard':287 'identif':86,130,230 'identifi':213,303 'implement':42,70,185 'improv':315 'ind':544 'indepvar':528,541,556 'index':200,208,217 'indic':88 'industri':536 'industry-year':535 'infer':174 'issu':343,472 'iv':234,388 'ivreg2':392 'ivregress':391 'jar':22,255,258,261,264,268,275,278,282,289,292,341,443,464,470 'journal':23 'level':242 'librari':8,57 'like':38 'limit':50,136 'llz':267 'macbeth':415,417 'matching/psm':382 'metadata':220 'method':43,71,77,222 'methodolog':60,113,162 'methodologist/advisor':179 'multipl':184 'name':330,460 'newey':418 'npstv':271 'off':99 'offer':181 'one':76 'optim':107 'output':429,548 'outreg2':431 'overview':437 'panel':366 'paper':69,102,144,153,215,455,480 'parallel':398 'pattern':7,56,105,141,324,347,365,509 'peer':20 'peer-review':19 'pischk':171 'placebo':245 'post':394,397 'primari':199,221 'problem':156 'procedur':36 'provid':14,80,139 'pscore':387 'psm':122,233 'psmatch2':227,383 'publish':68,143 'qreg':425 'quantil':423 'queri':249,352 'question':37,114 'rdd':235,400 'rddensiti':402 'rdrobust':401 'read':202,300 'recommend':106 'reduc':311 'refer':163 'references.md':251 'references/references.md':196,211,450 'reghdf':226,368,526,539,554 'regress':367,389,424 'relev':214 'replac':566,579 'replic':27 'research':4,13,26,95,108,146,332 'return':408 'review':21 'robust':90 'robustness/special':239 'scope':48 'se':571 'search':209,210 'see':190,449 'ses':523 'shortcod':466,473 'show':45,66,150,183 'similar':155 'singleton':358 'skill':52,138 'skill-18-jusi-aalto-stata-accounting-research' 'sourc':101,336 'source-brycewang-stanford' 'spec':244 'specif':350 'sqreg':426 'stack':272 'stage':206,296,317 'standard':508 'star':567 'stata':2,5,82,223,439,514,550,573 'stata-accounting-research':1 'stcox':228,410 'strategi':87,131,231 'streg':411 'structur':219 'stset':412 'studi':237,404 'suggest':160 'surviv':409 'syntax':16,83,309,351 'tabl':428 'table.tex':565 'target':203 'task':363 'teffect':384 'test':15,81,91,246 'titl':456 'topic-academic-research' 'topic-agent-skills' 'topic-ai-agent' 'topic-awesome-list' 'topic-communication' 'topic-copaper' 'topic-economics' 'topic-education' 'topic-empirical-research' 'topic-international-relations' 'topic-political-science' 'topic-psychology' 'trade':98 'trade-off':97 'treat':395,396 'trend':399 'usag':313 'use':31,75,118,195,225,564 'user':34,111,177,188,327 'v55':462 'v62':468 'valid':132 'variabl':329 'variat':191 'varlist':575 'vce':380 'volum':342,444,465,471,476,478 'west':419 'winsor':241,433,434,572 'winsor2':435,574 'workflow':194 'xtivreg':390 'xtreg':369 'xyz':295 'year':340,375,479,517,532,537,545,560","prices":[{"id":"2e50b936-1e8c-4e22-a803-0607fcbf3b4e","listingId":"3a148cfc-5d1c-429d-aa3e-99b2acb12a77","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"brycewang-stanford","category":"Awesome-Agent-Skills-for-Empirical-Research","install_from":"skills.sh"},"createdAt":"2026-04-18T22:12:43.003Z"}],"sources":[{"listingId":"3a148cfc-5d1c-429d-aa3e-99b2acb12a77","source":"github","sourceId":"brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research/18-jusi-aalto-stata-accounting-research","sourceUrl":"https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research/tree/main/skills/18-jusi-aalto-stata-accounting-research","isPrimary":false,"firstSeenAt":"2026-04-18T22:12:43.003Z","lastSeenAt":"2026-05-02T12:52:56.134Z"}],"details":{"listingId":"3a148cfc-5d1c-429d-aa3e-99b2acb12a77","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"brycewang-stanford","slug":"18-jusi-aalto-stata-accounting-research","github":{"repo":"brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research","stars":598,"topics":["academic-research","agent-skills","ai-agent","awesome-list","communication","copaper","economics","education","empirical-research","international-relations","political-science","psychology","public-administration","reproducible-research","skills-library","social-science","sociology"],"license":"other","html_url":"https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research","pushed_at":"2026-04-30T20:01:12Z","description":"🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库，覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文，并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.","skill_md_sha":"e026f70fe8d3e877739cd9aad2163db343d16ff3","skill_md_path":"skills/18-jusi-aalto-stata-accounting-research/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research/tree/main/skills/18-jusi-aalto-stata-accounting-research"},"layout":"multi","source":"github","category":"Awesome-Agent-Skills-for-Empirical-Research","frontmatter":{"name":"stata-accounting-research","description":"STATA code pattern library for empirical archival accounting research. Provides tested syntax from 126 peer-reviewed JAR (Journal of Accounting Research) replication files (2017-2025). Use when the user asks procedural questions like \"How do I implement [method]?\" or \"Show me code for [technique]\" — including: entropy balancing, propensity score matching (PSM), difference-in-differences (DiD), regression discontinuity (RDD), instrumental variables (IV), event studies (CAR/BHAR), survival analysis, Fama-MacBeth regressions, bootstrap, quantile regression, reghdfe/xtreg/areg, clustering standard errors, fixed effects, esttab/outreg2 table formatting, winsorization, leads/lags. Users can specify their variables (e.g., treatment, outcomes, controls) and receive adapted syntax. NOTE: This skill provides code patterns from published papers, not research design advice."},"skills_sh_url":"https://skills.sh/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research/18-jusi-aalto-stata-accounting-research"},"updatedAt":"2026-05-02T12:52:56.134Z"}}