Awesome-Agent-Skills-for-Empirical-Research new-analysis
Scaffolds a method-specific analysis notebook (DiD, IV, RDD, LASSO, Panel FE) with boilerplate. Use when starting a new econometric analysis.
install
source · Clone the upstream repo
git clone https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/29-quarcs-lab-project20XXy/dot-claude/skills/new-analysis" ~/.claude/skills/brycewang-stanford-awesome-agent-skills-for-empirical-research-new-analysis && rm -rf "$T"
manifest:
skills/29-quarcs-lab-project20XXy/dot-claude/skills/new-analysis/SKILL.mdsource content
Scaffold Analysis Notebook
Create a new notebook pre-populated with method-specific boilerplate for a common econometric technique.
Arguments
— the method name and optional title (e.g., "DiD Event Study", "IV Analysis of Colonial Origins", "RDD Minimum Wage", "LASSO Variable Selection", "Panel FE Growth Regressions")$ARGUMENTS
Steps
-
Parse the method from the arguments. Recognized methods:
- DiD (difference-in-differences)
- IV (instrumental variables)
- RDD (regression discontinuity design)
- LASSO (regularized regression / variable selection)
- Panel FE (panel fixed effects)
- If the method is not recognized, ask the user to clarify.
-
Follow the same notebook creation conventions as
:/project:new-notebook- Check
for existing files to determine the next sequential numbernotebooks/ - Ask the user for the kernel: Python, R, or Stata
- Create the
with the appropriate kernel and setup cell:.ipynb- Python:
import sys; sys.path.insert(0, ".."); from config import set_seeds, DATA_DIR; set_seeds() - R:
source("../config.R"); set_seeds() - Stata:
followed byclear allset seed 42
- Python:
- Check
-
Add method-specific sections as markdown and code cells:
All methods include these sections:
- Data Loading (code cell)
- Variable Construction (code cell)
- Summary Statistics (code cell with
)#| label: tbl-<method>-sumstats - Estimation (code cell with
)#| label: tbl-<method>-main - Visualization (code cell with
)#| label: fig-<method>-main - Robustness Checks (markdown header + empty code cell)
Method-specific boilerplate:
- DiD: parallel trends test, event study plot (
), TWFE regression, staggered treatment note#| label: fig-event-study - IV: first-stage regression, reduced-form, 2SLS estimation, weak instrument diagnostics (F-statistic, Anderson-Rubin), overidentification test stub
- RDD: running variable histogram, McCrary density test, bandwidth selection (Imbens-Kalyanaraman), local polynomial estimation, RD plot (
)#| label: fig-rd-plot - LASSO: cross-validation for lambda, coefficient path plot (
), selected variables, post-LASSO OLS#| label: fig-lasso-path - Panel FE: within estimator, entity and time FE, clustered standard errors, Hausman test (FE vs RE)
-
Create the Jupytext
pair:.mduv run jupytext --set-formats ipynb,md:myst notebooks/<name>.ipynb -
Register in
under_quarto.yml
:manuscript.notebooks- notebook: notebooks/<name>.ipynb title: "N<number>: <title>" -
Confirm the notebook renders:
quarto render notebooks/<name>.ipynb -
Report the file path and list the embed-ready cell labels created.