Robustness Battery
Standardized referee-anticipating robustness sweep for any headline coefficient.
Inputs (ask the user)
- Main spec do-file or script (path).
- Dependent variable and key regressor(s) to track.
- Headline coefficient sign + p-value to test stability against.
Variants to run (5 families × ≥1 each)
- Estimator — OLS, Gassen-Veenman M-est, MM-est, Poisson (if outcome non-negative), LP-DiD or stacked DiD (if event-time).
- Sample — drop top/bottom 1% of outcome, drop largest 1% by size, balanced panel only, alt time window (e.g., pre-COVID), drop singleton FE groups.
- Controls — none, firm FE only, firm + year FE, firm + industry-year FE, plus bank- or lender-level controls.
- Weights — unweighted, WLS by inverse propensity, WLS by firm size.
- Clustering — primary (firm), two-way (firm + year), two-way (firm + bank/lender), bootstrap SEs.
Aim for ≥ 5 variants per headline coefficient.
Fast-grid mode (default when the user names the variants)
When the user asks for "the grid in one pass," run the main spec plus these six columns
together, in a single pass, and return one comparison table with coef, SE, and N
per column:
- Baseline, firm-clustered
- Industry × year FE
- Rating × year FE
- 90% CI (report the interval, not just stars)
- Contemporaneous treatment measure
- Domestic-only subsample
Rules for this mode:
- Never silently drop a failing spec. If a column errors (r(504), collinearity,
time-invariant regressor, empty sample), keep the column in the table and write the
failure reason in its cell. Report the Stata error code verbatim.
- State the exact main spec back to the user — LHS, RHS, FE set, sample filter, clustering —
before running anything.
- One pass means one batch: don't hand back column 1 and wait for a follow-up asking for
column 2.
Execution
For each variant, write a small Stata or Python wrapper that:
- Loads the same data the main spec uses.
- Applies only the variant's modification.
- Estimates the model.
- Appends one row to
results/robustness_results.csv with columns: family, variant, coef, se, t, p, n, pass_sign, pass_sig.
Run variants in parallel where independent (e.g., xargs -P 4 over Stata batch mode, or asyncio over Python).
Output
results/robustness_results.csv — full raw results.
results/appendix_robustness.tex — esttab/booktabs table grouped by family.
results/robustness_forest.png — coefficient stability forest plot, headline overlaid as vertical line.
- Short summary (≤ 8 lines): how many variants pass sign, how many pass significance, and any flagged spec where the headline breaks (name the variant).
Stopping rule
Stop only when every tracked coefficient has ≥ 5 variants AND every variant either:
- Passes both sign and significance, OR
- Has been explicitly noted in the summary with a sentence on why it differs.
Notes
- Do NOT paste full tables into chat. Write to
results/ and link the path.
- If a variant runs > 30 minutes, send it to background and report job ID.
1---2name: robustness-battery3description: Use when preparing a paper for submission or responding to referees and you need a full battery of robustness checks for a headline result. Enumerates reviewer-anticipated variants across estimator, sample, controls, weights, and clustering, runs them as parallel jobs, and produces a comparison table + sign/significance stability summary.4---56# Robustness Battery78Standardized referee-anticipating robustness sweep for any headline coefficient.910## Inputs (ask the user)1112- Main spec do-file or script (path).13- Dependent variable and key regressor(s) to track.14- Headline coefficient sign + p-value to test stability against.1516## Variants to run (5 families × ≥1 each)17181. **Estimator** — OLS, Gassen-Veenman M-est, MM-est, Poisson (if outcome non-negative), LP-DiD or stacked DiD (if event-time).192. **Sample** — drop top/bottom 1% of outcome, drop largest 1% by size, balanced panel only, alt time window (e.g., pre-COVID), drop singleton FE groups.203. **Controls** — none, firm FE only, firm + year FE, firm + industry-year FE, plus bank- or lender-level controls.214. **Weights** — unweighted, WLS by inverse propensity, WLS by firm size.225. **Clustering** — primary (firm), two-way (firm + year), two-way (firm + bank/lender), bootstrap SEs.2324Aim for ≥ 5 variants per headline coefficient.2526## Fast-grid mode (default when the user names the variants)2728When the user asks for "the grid in one pass," run the main spec plus these six columns29**together, in a single pass**, and return one comparison table with `coef`, `SE`, and `N`30per column:31321. Baseline, firm-clustered332. Industry × year FE343. Rating × year FE354. 90% CI (report the interval, not just stars)365. Contemporaneous treatment measure376. Domestic-only subsample3839Rules for this mode:4041- **Never silently drop a failing spec.** If a column errors (r(504), collinearity,42 time-invariant regressor, empty sample), keep the column in the table and write the43 failure reason in its cell. Report the Stata error code verbatim.44- State the exact main spec back to the user — LHS, RHS, FE set, sample filter, clustering —45 **before** running anything.46- One pass means one batch: don't hand back column 1 and wait for a follow-up asking for47 column 2.4849## Execution5051For each variant, write a small Stata or Python wrapper that:52- Loads the same data the main spec uses.53- Applies only the variant's modification.54- Estimates the model.55- Appends one row to `results/robustness_results.csv` with columns: `family, variant, coef, se, t, p, n, pass_sign, pass_sig`.5657Run variants in parallel where independent (e.g., `xargs -P 4` over Stata batch mode, or asyncio over Python).5859## Output60611. `results/robustness_results.csv` — full raw results.622. `results/appendix_robustness.tex` — esttab/booktabs table grouped by family.633. `results/robustness_forest.png` — coefficient stability forest plot, headline overlaid as vertical line.644. Short summary (≤ 8 lines): how many variants pass sign, how many pass significance, and any flagged spec where the headline breaks (name the variant).6566## Stopping rule6768Stop only when every tracked coefficient has ≥ 5 variants AND every variant either:69- Passes both sign and significance, OR70- Has been explicitly noted in the summary with a sentence on why it differs.7172## Notes7374- Do NOT paste full tables into chat. Write to `results/` and link the path.75- If a variant runs > 30 minutes, send it to background and report job ID.