Quantitative Analysis for RED (red-data-analysis)
When to trigger
- Calibrating or estimating a dynamic model and reporting model-vs-data fit
- Building the numerical experiments that carry a computational paper
- Making the computation reproducible ahead of the RED data/code archive
What RED-quality analysis looks like
RED is method-defined, so "data analysis" usually means disciplining a dynamic model, and for
purely theoretical papers it is lighter — focus there on numerical examples and reproducible
computation that illustrate the result rather than estimate it.
- Calibration — list every parameter, its value, its source/target, and whether it is calibrated,
estimated, or assumed. Calibration targets should be explicit moments, not vibes.
- Moment-matching / estimation — report the targeted moments, the fit (model vs data), and untargeted
moments the model also matches (a strong credibility signal). Document the estimator and its assumptions.
- Numerical solution discipline — state the solution method (perturbation, projection, global, EGM,
sequence-space), the grid/approximation order, and an accuracy check (e.g., Euler-equation errors).
- Reproducible computation — fix and record random seeds, capture software/OS and package
versions, and write a master "run-all" script. RED's readme requires execution order, expected runtime,
and seeds, so build that discipline in from the start.
Execution bridge (StatsPAI / Stata MCP)
Run the battery, don't just enumerate it. Full map:
execution-with-mcp. RED is quantitative macro — mostly structural/calibration, which is outside this causal-inference toolchain; apply the chain to its empirical/reduced-form papers.
- Many outcomes / specifications:
romano_wolf (step-down FWER) or benjamini_hochberg.
- OVB sensitivity:
oster_delta / sensemakr.
- Inference:
wild_cluster_bootstrap (few clusters), twoway_cluster / conley.
- Re-fit off one handle:
audit_result(result_id) lists missing checks + the exact
suggest_function for each.
- Exhibits:
etable / did_summary_to_latex from the handle — no retyped numbers.
Decisive checks in the body, exhaustive battery in the appendix.
JF execution walkthrough.
Checklist
Anti-patterns
- Reporting only the moments the model was calibrated to hit
- An undocumented numerical solution with no accuracy diagnostic
- Leaving seeds and environment uncaptured, so the archive will not reproduce
RED analysis table skeleton
Require a compact audit table before results are written:
| Item |
RED-ready entry |
| Parameters |
value, source/target, calibrated vs estimated vs assumed |
| Data moments |
targeted moments plus untargeted validation moments |
| Solver |
method, grid/order, convergence rule, accuracy diagnostic |
| Experiments |
baseline, counterfactual, transition path, sensitivity |
| Archive |
run-all command, seeds, software/OS, expected runtime |
This table can become a manuscript table, appendix table, or replication README section. If it cannot be
filled, the quantitative core is not ready for RED.
Illustrative calibration record (Aiyagari-style economy)
Both the paper and the archive should carry a calibration record in this shape (values illustrative):
Internally calibrated (chosen to hit model-generated targets):
beta = 0.957 target: K/Y = 2.9 (annual) model hits: 2.90
phi = -1.1 target: share with negative net worth = 13.5% model hits: 13.2%
Externally set (taken from outside estimates):
sigma = 2.0 CRRA; standard in the incomplete-markets literature (author-year)
rho_z = 0.91 AR(1) earnings persistence, PSID estimates (author-year)
Accuracy at this parameterization:
max log10 |Euler error| = -4.6, 200-pt log-spaced asset grid, a_max = 40x mean income
Separating internally calibrated from externally set parameters matters at RED: referees check
whether each internal target is actually informative about its parameter, and whether external values
are sourced rather than convenient.
Moment-fit objections and the RED-grade response
| Objection |
Fix |
| "Targets are not independent of the moment you claim to explain" |
re-calibrate with the headline moment excluded; report it as untargeted |
| "Fit shown only for targeted moments" |
add an untargeted panel (wealth Gini, top shares, MPC distribution) |
| "No accuracy diagnostic at the headline solution" |
Euler or den Haan errors at exactly that parameterization |
| "Grid and discretization undocumented" |
state grid sizes, bounds, Rouwenhorst/Tauchen choice, and a grid-doubling stability check |
Minimum reproducible run
Before submission, maintain two runs:
- Smoke run: reduced grid or shorter simulation that completes quickly and verifies code paths.
- Publication run: full grid, full simulation length, final seeds, final moments, and final exhibits.
Both runs should write comparable output names and logs. If the smoke run and publication run disagree in
qualitative direction, the numerical method needs diagnosis before the paper is ready. Record expected
runtime for both because RED's readme requirement makes runtime part of the archive, not an afterthought.
Output format
[Analysis status] ready / missing moments / weak solver diagnostics / unreproducible
[Calibration/estimation] <targets, parameters, estimator>
[Numerical checks] <solver, accuracy, convergence, sensitivity>
[Archive readiness] run-all / seeds / OS / runtime / missing
[Next analysis] <single computation or table to repair>
Supplementary resources
1---2name: red-data-analysis3description: Use when building or auditing the quantitative analysis behind a Review of Economic Dynamics (RED) manuscript — calibration, moment-matching, structural estimation, and numerical-solution discipline for dynamic models, plus reproducible-computation hygiene that the RED code-first culture expects. Lighter on raw empirics for purely theoretical papers; focused on numerical examples and reproducible computation there.4metadata:5 source: https://skillmd.com/skills/brycewang-stanford/red-data-analysis6---78# Quantitative Analysis for RED (red-data-analysis)910## When to trigger1112- Calibrating or estimating a dynamic model and reporting model-vs-data fit13- Building the numerical experiments that carry a computational paper14- Making the computation reproducible ahead of the RED data/code archive1516## What RED-quality analysis looks like1718RED is method-defined, so "data analysis" usually means **disciplining a dynamic model**, and for19**purely theoretical** papers it is lighter — focus there on **numerical examples and reproducible20computation** that illustrate the result rather than estimate it.2122- **Calibration** — list every parameter, its value, its source/target, and whether it is calibrated,23 estimated, or assumed. Calibration targets should be explicit moments, not vibes.24- **Moment-matching / estimation** — report the targeted moments, the fit (model vs data), and untargeted25 moments the model also matches (a strong credibility signal). Document the estimator and its assumptions.26- **Numerical solution discipline** — state the solution method (perturbation, projection, global, EGM,27 sequence-space), the grid/approximation order, and an **accuracy check** (e.g., Euler-equation errors).28- **Reproducible computation** — fix and record **random seeds**, capture software/OS and package29 versions, and write a master "run-all" script. RED's readme requires execution order, expected runtime,30 and seeds, so build that discipline in from the start.3132## Execution bridge (StatsPAI / Stata MCP)3334Run the battery, don't just enumerate it. Full map:35[`execution-with-mcp`](../../../shared-resources/empirical-methods/execution-with-mcp.md). RED is quantitative macro — mostly structural/calibration, which is outside this causal-inference toolchain; apply the chain to its empirical/reduced-form papers.3637- **Many outcomes / specifications:** `romano_wolf` (step-down FWER) or `benjamini_hochberg`.38- **OVB sensitivity:** `oster_delta` / `sensemakr`.39- **Inference:** `wild_cluster_bootstrap` (few clusters), `twoway_cluster` / `conley`.40- **Re-fit off one handle:** `audit_result(result_id)` lists missing checks + the exact41 `suggest_function` for each.42- **Exhibits:** `etable` / `did_summary_to_latex` from the handle — no retyped numbers.4344Decisive checks in the body, exhaustive battery in the appendix.45[JF execution walkthrough](../../../Journal-of-Finance-Skills/resources/worked-examples/02-execution-walkthrough.md).46## Checklist4748- [ ] Every parameter has a value and a documented source/target49- [ ] Targeted and untargeted moments reported; model-vs-data fit shown50- [ ] Solution method, approximation order, and an accuracy check are stated51- [ ] Seeds fixed/recorded; environment captured; a run-all script exists5253## Anti-patterns5455- Reporting only the moments the model was calibrated to hit56- An undocumented numerical solution with no accuracy diagnostic57- Leaving seeds and environment uncaptured, so the archive will not reproduce5859## RED analysis table skeleton6061Require a compact audit table before results are written:6263| Item | RED-ready entry |64|---|---|65| Parameters | value, source/target, calibrated vs estimated vs assumed |66| Data moments | targeted moments plus untargeted validation moments |67| Solver | method, grid/order, convergence rule, accuracy diagnostic |68| Experiments | baseline, counterfactual, transition path, sensitivity |69| Archive | run-all command, seeds, software/OS, expected runtime |7071This table can become a manuscript table, appendix table, or replication README section. If it cannot be72filled, the quantitative core is not ready for RED.7374## Illustrative calibration record (Aiyagari-style economy)7576Both the paper and the archive should carry a calibration record in this shape (values illustrative):7778```text79Internally calibrated (chosen to hit model-generated targets):80 beta = 0.957 target: K/Y = 2.9 (annual) model hits: 2.9081 phi = -1.1 target: share with negative net worth = 13.5% model hits: 13.2%82Externally set (taken from outside estimates):83 sigma = 2.0 CRRA; standard in the incomplete-markets literature (author-year)84 rho_z = 0.91 AR(1) earnings persistence, PSID estimates (author-year)85Accuracy at this parameterization:86 max log10 |Euler error| = -4.6, 200-pt log-spaced asset grid, a_max = 40x mean income87```8889Separating **internally calibrated** from **externally set** parameters matters at RED: referees check90whether each internal target is actually informative about its parameter, and whether external values91are sourced rather than convenient.9293## Moment-fit objections and the RED-grade response9495| Objection | Fix |96|---|---|97| "Targets are not independent of the moment you claim to explain" | re-calibrate with the headline moment excluded; report it as untargeted |98| "Fit shown only for targeted moments" | add an untargeted panel (wealth Gini, top shares, MPC distribution) |99| "No accuracy diagnostic at the headline solution" | Euler or den Haan errors at exactly that parameterization |100| "Grid and discretization undocumented" | state grid sizes, bounds, Rouwenhorst/Tauchen choice, and a grid-doubling stability check |101102## Minimum reproducible run103104Before submission, maintain two runs:105106- **Smoke run**: reduced grid or shorter simulation that completes quickly and verifies code paths.107- **Publication run**: full grid, full simulation length, final seeds, final moments, and final exhibits.108109Both runs should write comparable output names and logs. If the smoke run and publication run disagree in110qualitative direction, the numerical method needs diagnosis before the paper is ready. Record expected111runtime for both because RED's readme requirement makes runtime part of the archive, not an afterthought.112113## Output format114115```text116[Analysis status] ready / missing moments / weak solver diagnostics / unreproducible117[Calibration/estimation] <targets, parameters, estimator>118[Numerical checks] <solver, accuracy, convergence, sensitivity>119[Archive readiness] run-all / seeds / OS / runtime / missing120[Next analysis] <single computation or table to repair>121```122123## Supplementary resources124125- [`../../resources/external_tools.md`](../../resources/external_tools.md) — Dynare, SSJ, Julia/QuantEcon, FRED126- [`red-replication-and-data-policy`](../red-replication-and-data-policy/SKILL.md) — the archive these outputs feed