Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Econometrics skill for OLS regression and linear models. Activates when the user asks about: "run OLS", "linear regression", "ordinary least squares", "interpret regression results", "heteroskedasticity", "multicollinearity", "regression assumptions", "robust standard errors", "GLS", "WLS", "fit a regression model", "check regression diagnostics", "OLS假设", "最小二乘法", "线性回归", "回归系数", "残差检验", "异方差", "多重共线性", "普通最小二乘", "稳健标准误", "回归诊断"
.claude/skills/brycewang-stanford-ols-regression/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-19 | ✓→✓ | = Same ✓ | 48% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 114% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 62% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 89% | 0% |
This skill provides comprehensive guidance for OLS regression and linear models in empirical research. It covers model specification, assumption testing, diagnostic checks, and result interpretation, with code examples in Python, R, and Stata.
When assisting with OLS regression, follow this sequence:
Violation of assumptions 4–5 does not bias OLS but affects standard errors. Violation of assumption 4 (endogeneity) biases estimates — recommend IV methods.
pythonimport statsmodels.api as sm import statsmodels.formula.api as smf # With robust standard errors model = smf.ols('y ~ x1 + x2 + x3', data=df).fit(cov_type='HC3') print(model.summary())
rlibrary(lmtest) library(sandwich) model <- lm(y ~ x1 + x2 + x3, data = df) coeftest(model, vcov = vcovHC(model, type = "HC3"))
statareg y x1 x2 x3, robust
Run all diagnostics after fitting. See references/ols-reference.md for full test details.
| Issue | Test | Quick Fix | |-------|------|-----------| | Heteroskedasticity | Breusch-Pagan, White test | Robust SE | | Autocorrelation | Durbin-Watson, Breusch-Godfrey | Newey-West SE | | Multicollinearity | VIF > 10 | Drop/combine variables | | Non-normality of errors | Jarque-Bera | Check outliers; large N mitigates | | Omitted variable bias | Ramsey RESET | Respecify model |
For detailed test formulas, code, and extended examples, see references/ols-reference.md.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,236 | 10,204 | -23% | 1 | 1 | 0% | 3,068 | 3,309 | +8% | 0 | 0 | — |
case-02 | fail→fail | 17,190 | 10,683 | -38% | 1 | 1 | 0% | 3,722 | 3,250 | -13% | 0 | 0 | — |
case-19 | pass→pass | 9,367 | 8,804 | -6% | 1 | 1 | 0% | 1,841 | 2,730 | +48% | 0 | 0 | — |
case-03 | pass→pass | 3,413 | 2,973 | -13% | 1 | 1 | 0% | 765 | 1,640 | +114% | 0 | 0 | — |
case-04 | pass→pass | 10,635 | 11,773 | +11% | 1 | 1 | 0% | 2,107 | 3,415 | +62% | 0 | 0 | — |
case-05 | pass→pass | 7,400 | 8,693 | +17% | 1 | 1 | 0% | 1,576 | 2,984 | +89% | 0 | 0 | — |
case-06 | pass→pass | 10,327 | 8,818 | -15% | 1 | 1 | 0% | 1,932 | 2,825 | +46% | 0 | 0 | — |
case-07 | pass→pass | 11,537 | 9,629 | -17% | 1 | 1 | 0% | 2,171 | 2,868 | +32% | 0 | 0 | — |
case-08 | pass→pass | 12,422 | 8,713 | -30% | 1 | 1 | 0% | 1,959 | 3,055 | +56% | 0 | 0 | — |
case-09 | fail→fail | 12,578 | 10,587 | -16% | 1 | 1 | 0% | 2,461 | 3,247 | +32% | 0 | 0 | — |
case-10 | pass→pass | 9,695 | 6,240 | -36% | 1 | 1 | 0% | 1,770 | 2,135 | +21% | 0 | 0 | — |
case-20 | pass→pass | 10,830 | 8,437 | -22% | 1 | 1 | 0% | 2,039 | 2,564 | +26% | 0 | 0 | — |
case-11 | pass→pass | 10,034 | 8,239 | -18% | 1 | 1 | 0% | 1,899 | 2,643 | +39% | 0 | 0 | — |
case-12 | pass→pass | 10,507 | 6,159 | -41% | 1 | 1 | 0% | 2,120 | 2,286 | +8% | 0 | 0 | — |
case-13 | pass→pass | 10,619 | 7,975 | -25% | 1 | 1 | 0% | 2,145 | 2,734 | +27% | 0 | 0 | — |
case-14 | fail→fail | 5,527 | 3,747 | -32% | 1 | 1 | 0% | 1,195 | 1,865 | +56% | 0 | 0 | — |
case-15 | fail→fail | 6,941 | 5,722 | -18% | 1 | 1 | 0% | 1,568 | 2,275 | +45% | 0 | 0 | — |
case-16 | pass→pass | 10,114 | 6,514 | -36% | 1 | 1 | 0% | 2,116 | 2,402 | +14% | 0 | 0 | — |
case-17 | pass→pass | 9,744 | 7,055 | -28% | 1 | 1 | 0% | 2,122 | 2,542 | +20% | 0 | 0 | — |
case-18 | pass→pass | 10,759 | 8,368 | -22% | 1 | 1 | 0% | 2,022 | 2,583 | +28% | 0 | 0 | — |
case-21 | pass→pass | 6,643 | 8,852 | +33% | 1 | 1 | 0% | 1,484 | 2,673 | +80% | 0 | 0 | — |
case-22 | pass→pass | 12,493 | 10,200 | -18% | 1 | 1 | 0% | 2,516 | 3,120 | +24% | 0 | 0 | — |
case-23 | pass→pass | 9,252 | 10,324 | +12% | 1 | 1 | 0% | 1,798 | 3,318 | +85% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +4 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.