一键导入
build-tables
Combine saved Stata estimates into publication-ready tables via esttab. Produces both .tex (for paper) and .csv (for audit) with consistent formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Combine saved Stata estimates into publication-ready tables via esttab. Produces both .tex (for paper) and .csv (for audit) with consistent formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Simulate a fresh-clone reproduction of the entire pipeline and diff the new outputs against the committed ones. Catches drift before paper submission or release.
Stage, commit, create PR, and merge to main. Use for the standard commit-PR-merge cycle.
End-to-end Stata analysis workflow — load, explore, clean, estimate, and produce publication-ready tables and figures with full logging.
Run a holistic narrative review on a Quarto report or Markdown document. Checks reader prerequisites, worked examples, notation clarity, structural arc, and pacing.
Render a Quarto report (Stata engine) to HTML / PDF / DOCX. Performs freshness check on included tables/figures, verifies the Stata Quarto engine, and validates numerical claims before rendering.
Apply the replication protocol to a paper. Inventory the replication package, record gold-standard targets with tolerances, translate the analysis to this project's Stata pipeline, and report a tolerance-by-tolerance comparison.
| name | build-tables |
| description | Combine saved Stata estimates into publication-ready tables via esttab. Produces both .tex (for paper) and .csv (for audit) with consistent formatting. |
| disable-model-invocation | true |
| argument-hint | [table-name or estimates-list] |
| allowed-tools | ["Bash","Read","Edit","Write","Grep","Glob"] |
Take a set of saved estimates and produce a single table in .tex (for the paper) and .csv (for audit / sharing) with the project's standard formatting.
dofiles/03_analysis/*.do that produces est store m_<name> resultsoutput/tables/ firstIdentify the estimates in $ARGUMENTS:
main_regression): search dofiles/03_analysis/ for est store m_main* and assemblem_ols m_iv m_did): use thoseLocate the producing do-file that has the est store calls. The do-file should also do the esttab export. If it doesn't, write a helper do-file in dofiles/04_output/<table>_assemble.do.
Compose the esttab call with project conventions:
estimates restore m_main
estimates restore m_alt_cluster
estimates restore m_alt_fe
esttab m_main m_alt_cluster m_alt_fe ///
using "output/tables/<name>.tex", replace ///
se star(* 0.10 ** 0.05 *** 0.01) ///
booktabs label collabels(none) ///
stats(N r2_within mean_dep, ///
labels("Observations" "Within R-sq" "Mean of dep var") ///
fmt(%9.0fc %9.3f %9.3f)) ///
drop(_cons) ///
title("<table title>") ///
addnotes("Standard errors clustered at <level>." ///
"Significance: * p<0.10, ** p<0.05, *** p<0.01.")
esttab m_main m_alt_cluster m_alt_fe ///
using "output/tables/<name>.csv", replace ///
se star(* 0.10 ** 0.05 *** 0.01) plain ///
stats(N r2_within mean_dep)
Run the do-file via /run-stata.
Verify outputs:
.tex and .csv exist in output/tables/.csv and spot-check coefficients are sensible.tex includes N, R², mean dep var, cluster info, significance starsReport: path of new .tex and .csv, the spec each column represents, a one-line summary of the headline coefficient.
/build-tables main_regression → assembles output/tables/main_regression.{tex,csv} from m_main-prefixed estimates./build-tables m_ols m_iv m_did → assembles a 3-column table from those specific saved estimates.est store m_<name> was never run. Re-run the producing do-file.mean_dep — add estadd ysumm after each reghdfe call in the producing do-file.esttab not installed — ssc install estout, replace.label option and define short labels via label var..tex and .csv — .tex is for the paper, .csv is for reviewers / coauthors who don't speak LaTeX..tex; the next pipeline run will overwrite it. Adjust esttab options instead.* p<0.10, ** p<0.05, *** p<0.01 is the project default. Override only if the journal requires different.