Publication Output
Generate publication-quality tables and figures for academic research papers. Routes to the appropriate output type based on content, applies standard academic formatting conventions, and produces files ready for LaTeX inclusion.
When to Use
Skip when:
- The task is choosing an empirical method or running estimation (use
empirical-playbook or causal-inference skill)
- The task is journal submission logistics or referee responses (use
submission-guide skill)
- Results are exploratory and not yet ready for formatted output (finish estimation first)
Use when:
- After estimation: format regression results, diagnostics, or robustness checks into tables
- After simulation: format Monte Carlo results (bias, RMSE, coverage) into comparison tables
- For descriptive work: summary statistics, balance tables, transition matrices
- For visualization: event studies, RD plots, coefficient plots, power curves, densities, specification curves
Output Type Router
| Content type |
Output |
Reference |
| Regression results (coefficients, SEs, R², N) |
Stargazer-style coefficient table |
references/table-generation.md |
| Summary statistics (means, SDs, quantiles) |
Descriptive statistics panel |
references/table-generation.md |
| Monte Carlo output (bias, RMSE, coverage) |
Simulation results table |
references/table-generation.md |
| Balance / covariate comparison |
Balance table with normalized differences |
references/table-generation.md |
| Transition probabilities |
Matrix with row/column labels |
references/table-generation.md |
| First-stage IV results |
First-stage regression table |
references/table-generation.md |
| Time-relative coefficients (leads/lags) |
Event study plot |
references/figure-generation.md |
| Running variable + cutoff |
RD plot with local polynomial |
references/figure-generation.md |
| Multiple estimates with CIs |
Coefficient comparison plot |
references/figure-generation.md |
| Sample sizes × effect sizes |
Power curve |
references/figure-generation.md |
| Group distributions |
Density / kernel density plot |
references/figure-generation.md |
| Two continuous variables |
Binned scatter plot |
references/figure-generation.md |
| Sorted estimates + indicator matrix |
Specification curve |
references/figure-generation.md |
Format Defaults
Tables
| Setting |
Default |
| Format |
LaTeX (booktabs: \toprule, \midrule, \bottomrule) |
| Stars |
On coefficients, never on SEs (* p<0.10, ** p<0.05, *** p<0.01) |
| SEs |
In parentheses, directly below coefficient |
| Decimal alignment |
All numbers in a column align at decimal point |
| Fixed effects |
Yes/No indicator rows, not coefficient rows |
| Negative numbers |
Minus sign (economics convention), not parentheses |
| File location |
tables/<descriptive-name>.tex |
| Label format |
tab:<name> |
Figures
| Setting |
Default |
| Font |
Serif (Computer Modern / Times), 11-12pt labels |
| Size |
6.5" × 4.5" (single column), 13" × 4.5" (two-panel) |
| DPI |
Vector (PDF) primary, 300 DPI PNG secondary |
| Style |
White background, no gridlines, bottom+left axes only |
| Color |
Grayscale-friendly with distinct markers and line styles |
| Colorblind |
Okabe-Ito or ColorBrewer Set2 when color is used |
| File location |
figures/<descriptive-name>.pdf + .png |
| Label format |
fig:<name> |
Language-Specific Packages
| Language |
Tables |
Figures |
| Python |
pandas, stargazer, pystout, tabulate |
matplotlib + seaborn |
| R |
stargazer, modelsummary, kableExtra, gt, tinytable, fixest::etable() |
ggplot2, coefplot, binsreg |
| Julia |
PrettyTables.jl, Latexify.jl |
Plots.jl, Makie.jl |
| Stata |
esttab, outreg2, estout |
twoway, coefplot, binscatter |
Package notes:
pystout (Python) — estout-style regression tables for statsmodels and linearmodels (OLS, IV2SLS, PanelOLS). Supports mgroups for column grouping, modstat for custom statistics rows.
tinytable (R) — lightweight, native Typst support, used as modelsummary backend.
fixest::etable() (R) — direct from estimation, handles multi-way FE notation automatically.
Automated vs semi-automated tradeoff: Automated tools (esttab, stargazer) are quick but hard to customize. Semi-automated tools (save intermediates, generate LaTeX separately) are harder to start but easier to customize. Costs are convex for automated, concave for semi-automated.
Quarto+Typst: Quarto with Typst backend offers sub-second compilation for iterative work. Use keep-tex: true for journal submission when you need the raw LaTeX output.
Multi-Panel Assembly
Tables and figures often require multi-panel layouts:
| Pattern |
Table panels |
Figure layout |
| Multiple outcomes |
Panel A/B/C by outcome |
1×2 or 1×3 side-by-side |
| Multiple samples |
Panel by subsample |
2×1 stacked |
| Multiple methods |
Panel by estimator (OLS/IV/GMM) |
2×2 grid |
| Robustness variants |
Columns within one panel |
2×3 grid |
| Event study + pre-trends |
— |
2×1 stacked (estimates + test) |
Ensure consistent axis scales, font sizes, and formatting across panels. Label panels as (a), (b), (c) or Panel A, Panel B, Panel C.
Quick Examples
Python: Regression Table
import pandas as pd
from stargazer.stargazer import Stargazer
from linearmodels.iv import IV2SLS
# Format results with stargazer
stargazer = Stargazer([ols_result, iv_result])
stargazer.custom_columns(["OLS", "IV/2SLS"])
stargazer.show_model_numbers(False)
stargazer.significant_digits(3)
with open("tables/main-results.tex", "w") as f:
f.write(stargazer.render_latex())
Python: Event Study Plot
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams.update({"font.family": "serif", "font.size": 11})
fig, ax = plt.subplots(figsize=(6.5, 4.5))
ax.errorbar(leads_lags, coefficients, yerr=1.96 * se, fmt="o-", color="black", capsize=3)
ax.axhline(y=0, color="gray", linestyle="--", linewidth=0.8)
ax.axvline(x=-0.5, color="red", linestyle=":", linewidth=0.8)
ax.set_xlabel("Periods relative to treatment")
ax.set_ylabel("Coefficient estimate")
ax.spines[["top", "right"]].set_visible(False)
fig.savefig("figures/event-study.pdf", bbox_inches="tight")
Quality Checklist
Before finalizing any output:
Integration with Other Components
econometric-reviewer agent preloads this skill to audit tables against code output
econometric-reviewer may request formatted output during /workflows:review
/workflows:compound captures table/figure templates into docs/solutions/
- Companion outputs: regression table → summary statistics table; event study → pre-trend test figure
1---2name: publication-output3description: This skill covers publication-quality tables and figures for academic research papers. Use when formatting regression results, summary statistics, Monte Carlo output, or research visualizations for LaTeX inclusion. Triggers on "table", "figure", "tabulate", "stargazer", "publication-ready", "LaTeX table", "event study plot", "coefficient plot", "RD plot", "power curve", "specification curve", "binscatter", "format results", "booktabs".4---56# Publication Output78Generate publication-quality tables and figures for academic research papers. Routes to the appropriate output type based on content, applies standard academic formatting conventions, and produces files ready for LaTeX inclusion.910## When to Use1112Skip when:13- The task is choosing an empirical method or running estimation (use `empirical-playbook` or `causal-inference` skill)14- The task is journal submission logistics or referee responses (use `submission-guide` skill)15- Results are exploratory and not yet ready for formatted output (finish estimation first)1617Use when:18- After estimation: format regression results, diagnostics, or robustness checks into tables19- After simulation: format Monte Carlo results (bias, RMSE, coverage) into comparison tables20- For descriptive work: summary statistics, balance tables, transition matrices21- For visualization: event studies, RD plots, coefficient plots, power curves, densities, specification curves2223## Output Type Router2425| Content type | Output | Reference |26|---|---|---|27| Regression results (coefficients, SEs, R², N) | Stargazer-style coefficient table | `references/table-generation.md` |28| Summary statistics (means, SDs, quantiles) | Descriptive statistics panel | `references/table-generation.md` |29| Monte Carlo output (bias, RMSE, coverage) | Simulation results table | `references/table-generation.md` |30| Balance / covariate comparison | Balance table with normalized differences | `references/table-generation.md` |31| Transition probabilities | Matrix with row/column labels | `references/table-generation.md` |32| First-stage IV results | First-stage regression table | `references/table-generation.md` |33| Time-relative coefficients (leads/lags) | Event study plot | `references/figure-generation.md` |34| Running variable + cutoff | RD plot with local polynomial | `references/figure-generation.md` |35| Multiple estimates with CIs | Coefficient comparison plot | `references/figure-generation.md` |36| Sample sizes × effect sizes | Power curve | `references/figure-generation.md` |37| Group distributions | Density / kernel density plot | `references/figure-generation.md` |38| Two continuous variables | Binned scatter plot | `references/figure-generation.md` |39| Sorted estimates + indicator matrix | Specification curve | `references/figure-generation.md` |4041## Format Defaults4243### Tables4445| Setting | Default |46|---|---|47| Format | LaTeX (booktabs: `\toprule`, `\midrule`, `\bottomrule`) |48| Stars | On coefficients, never on SEs (* p<0.10, ** p<0.05, *** p<0.01) |49| SEs | In parentheses, directly below coefficient |50| Decimal alignment | All numbers in a column align at decimal point |51| Fixed effects | Yes/No indicator rows, not coefficient rows |52| Negative numbers | Minus sign (economics convention), not parentheses |53| File location | `tables/<descriptive-name>.tex` |54| Label format | `tab:<name>` |5556### Figures5758| Setting | Default |59|---|---|60| Font | Serif (Computer Modern / Times), 11-12pt labels |61| Size | 6.5" × 4.5" (single column), 13" × 4.5" (two-panel) |62| DPI | Vector (PDF) primary, 300 DPI PNG secondary |63| Style | White background, no gridlines, bottom+left axes only |64| Color | Grayscale-friendly with distinct markers and line styles |65| Colorblind | Okabe-Ito or ColorBrewer Set2 when color is used |66| File location | `figures/<descriptive-name>.pdf` + `.png` |67| Label format | `fig:<name>` |6869## Language-Specific Packages7071| Language | Tables | Figures |72|---|---|---|73| Python | pandas, stargazer, pystout, tabulate | matplotlib + seaborn |74| R | stargazer, modelsummary, kableExtra, gt, tinytable, fixest::etable() | ggplot2, coefplot, binsreg |75| Julia | PrettyTables.jl, Latexify.jl | Plots.jl, Makie.jl |76| Stata | esttab, outreg2, estout | twoway, coefplot, binscatter |7778**Package notes:**7980- `pystout` (Python) — estout-style regression tables for statsmodels and linearmodels (OLS, IV2SLS, PanelOLS). Supports `mgroups` for column grouping, `modstat` for custom statistics rows.81- `tinytable` (R) — lightweight, native Typst support, used as modelsummary backend.82- `fixest::etable()` (R) — direct from estimation, handles multi-way FE notation automatically.8384**Automated vs semi-automated tradeoff:** Automated tools (esttab, stargazer) are quick but hard to customize. Semi-automated tools (save intermediates, generate LaTeX separately) are harder to start but easier to customize. Costs are convex for automated, concave for semi-automated.8586**Quarto+Typst:** Quarto with Typst backend offers sub-second compilation for iterative work. Use `keep-tex: true` for journal submission when you need the raw LaTeX output.8788## Multi-Panel Assembly8990Tables and figures often require multi-panel layouts:9192| Pattern | Table panels | Figure layout |93|---|---|---|94| Multiple outcomes | Panel A/B/C by outcome | 1×2 or 1×3 side-by-side |95| Multiple samples | Panel by subsample | 2×1 stacked |96| Multiple methods | Panel by estimator (OLS/IV/GMM) | 2×2 grid |97| Robustness variants | Columns within one panel | 2×3 grid |98| Event study + pre-trends | — | 2×1 stacked (estimates + test) |99100Ensure consistent axis scales, font sizes, and formatting across panels. Label panels as (a), (b), (c) or Panel A, Panel B, Panel C.101102## Quick Examples103104### Python: Regression Table105106```python107import pandas as pd108from stargazer.stargazer import Stargazer109from linearmodels.iv import IV2SLS110111# Format results with stargazer112stargazer = Stargazer([ols_result, iv_result])113stargazer.custom_columns(["OLS", "IV/2SLS"])114stargazer.show_model_numbers(False)115stargazer.significant_digits(3)116with open("tables/main-results.tex", "w") as f:117 f.write(stargazer.render_latex())118```119120### Python: Event Study Plot121122```python123import matplotlib.pyplot as plt124import matplotlib125126matplotlib.rcParams.update({"font.family": "serif", "font.size": 11})127fig, ax = plt.subplots(figsize=(6.5, 4.5))128ax.errorbar(leads_lags, coefficients, yerr=1.96 * se, fmt="o-", color="black", capsize=3)129ax.axhline(y=0, color="gray", linestyle="--", linewidth=0.8)130ax.axvline(x=-0.5, color="red", linestyle=":", linewidth=0.8)131ax.set_xlabel("Periods relative to treatment")132ax.set_ylabel("Coefficient estimate")133ax.spines[["top", "right"]].set_visible(False)134fig.savefig("figures/event-study.pdf", bbox_inches="tight")135```136137## Quality Checklist138139Before finalizing any output:140141- [ ] Decimal alignment consistent within each column142- [ ] Stars attached to coefficients only (never to SEs)143- [ ] SE format consistent throughout (parentheses or brackets, not mixed)144- [ ] Sample sizes sum correctly across panels145- [ ] Column/axis labels clear and unambiguous146- [ ] Significance note present if stars used147- [ ] LaTeX compiles without errors148- [ ] Figures readable in grayscale (B&W print)149- [ ] No default titles on figures (titles go in \caption)150- [ ] All information encoded in color also encoded in shape/line style151152## Integration with Other Components153154- `econometric-reviewer` agent preloads this skill to audit tables against code output155- `econometric-reviewer` may request formatted output during `/workflows:review`156- `/workflows:compound` captures table/figure templates into `docs/solutions/`157- Companion outputs: regression table → summary statistics table; event study → pre-trend test figure