stata_table
Export stored Stata models to a formatted LaTeX table using esttab and booktabs, then return the .tex file for papers or reports.
Instructions
Export stored models to a publication LaTeX table (esttab, booktabs) and return the .tex.
models: names from estimates store (e.g. ["m1","m2","m3"]), in column order.
filename: bare name -> stata_output/tables/.tex.
keep/order: Stata coefficient lists, e.g. "treat_post" or "1.treat#1.post".
coeflabels: {"treat_post": "Treat $\times$ Post"}; fe_rows: {"Firm FE": ["Yes","Yes","Yes"], ...}
stats: from N, r2, r2_a, r2_within, N_clust, F, ymean (ymean must be added via estadd);
default ["N","r2_a"] (use r2_within for reghdfe).
se_note: describe the SEs, e.g. "Standard errors clustered at the county level in parentheses."
Stars: * p<0.10, ** p<0.05, *** p<0.01. Requires estout (ssc install estout).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"models": "<models>",
"filename": "<filename>"
},
"name": "stata_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | ||
| label | No | ||
| notes | No | ||
| order | No | ||
| stats | No | ||
| title | No | ||
| models | Yes | ||
| fe_rows | No | ||
| mtitles | No | ||
| se_note | No | Standard errors in parentheses. | |
| decimals | No | ||
| filename | Yes | ||
| fragment | No | ||
| coeflabels | No | ||
| show_constant | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |