Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Parallel control variable combination search via Stata. Exhaustively searches all subsets of optional controls to find the combination that maximises |t| of the independent variable. Activates when user says: "控制变量搜索", "搜控制变量", "control variable search", "跑控制变量组合", "暴力搜索", "调控制变量".
Use this skill ↓45% 59%+14 ptsof test cases passed
Passed 13 of 22 test cases with the skill, and 10 of 22 without it.
3 of 3 safety checks passed
Not used yet
This skill generates a parallelised Stata .do file that:
tuplesreghdfe (or user-specified command) for each combination across N parallel Stata instancesImportant: 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.
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 | reghdfe |
| absorb | Fixed effects specification | absorb(<<CLUSTER>> year) |
| vce | Variance-covariance specification | vce(cluster <<CLUSTER>>) |
| STATA_EXE | Path to Stata executable | E:\Stata\StataMP-64.exe |
tuples generates 32,768+ combinations
and will freeze Stata. If the user provides more than 14, warn them and ask them to reduce or move
some into mandatory controls.<data_dir>\控制变量搜索_并行.do by default, placed next to the data file.After collecting parameters:
Next to this one in the catalogue, plus more from the same author.