SKILL.md
Control Variable Search Skill
This skill generates a parallelised Stata .do file that:
- Enumerates all subsets of optional control variables via
tuples - Runs
reghdfe(or user-specified command) for each combination across N parallel Stata instances - Ranks combinations by |t| of the independent variable
- Reports Top 10 and runs the best combination regression
Important: This skill only generates the .do file. It does NOT execute it. Tell the user the output path and let them run it in Stata themselves.
What to collect from the user
Ask the user for the following. Items marked (required) must be provided; others have defaults.
| Parameter | Description | Default |
|---|---|---|
| data file (required) | Full path to the .dta file | -- |
| dependent variable (Y) (required) | Y variable name | -- |
| independent variable (X) (required) | X variable of interest | -- |
| cluster variable (required) | Variable for clustering SE and fixed effects | -- |
| mandatory controls (required) | Controls always included | -- |
| optional controls (required) | Controls to search over (all subsets) | -- |
| N_WORKERS | Number of parallel Stata instances | 8 |
| significance level | Two-tailed alpha | 0.01 |
| model command | Estimation command |
