ols-regression
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 r…
Install / Use
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill ols-regressionInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Project & Program ManagementSupported Platforms
Tags
Our assessment of ols-regression
ols-regression scores 89/100 on our quality scale, 25th of 83 Project & Program Management skills we index (top 31%).
Its SKILL.md is 4.7 KB long, well organised into 15 sections with 3 code examples: a solid amount of guidance for an agent.
With 4,360 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so ols-regression is actively maintained.
- Our last check on 2026-10-31 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ols-regression compared with similar skills
All 4 of these similar skills score higher than ols-regression; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ols-regression (this skill)by brycewang-stanford | 89 | 4.4k | 54d ago | SKILL.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 149.0k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install ols-regression?
- Run
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill ols-regression. The install tabs above show the steps for each supported agent. - Which AI agents does ols-regression work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is ols-regression safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ols-regression still maintained?
- The repository was last updated about 2 months ago, so ols-regression is actively maintained.
Skill content
View source on GitHubname: ols-regression description: | 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假设", "最小二乘法", "线性回归", "回归系数", "残差检验", "异方差", "多重共线性", "普通最小二乘", "稳健标准误", "回归诊断"
OLS Regression Skill
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.
Core Workflow
When assisting with OLS regression, follow this sequence:
- Clarify the research question and data — understand dependent variable, key regressors, and sample
- Specify the model — choose functional form, control variables, fixed effects if needed
- Run the regression — provide code in the user's preferred language
- Check assumptions — run diagnostics systematically (see references)
- Interpret and report — explain coefficients, significance, fit, and caveats
Key Concepts
Model Specification
- Write the regression equation explicitly: Y = β₀ + β₁X₁ + ... + βₖXₖ + ε
- Consider log transformations for skewed variables or elasticity interpretation
- Include relevant controls to reduce omitted variable bias
- Watch for irrelevant variables inflating standard errors
The Gauss-Markov Assumptions
- Linearity in parameters
- Random sampling
- No perfect multicollinearity
- Zero conditional mean of errors: E(ε|X) = 0
- Homoskedasticity: Var(ε|X) = σ²
- (For inference) Normally distributed errors
Violation of assumptions 4–5 does not bias OLS but affects standard errors. Violation of assumption 4 (endogeneity) biases estimates — recommend IV methods.
Standard Error Options
- Default OLS SE: valid only under homoskedasticity
- HC robust SE (White): use when heteroskedasticity is suspected; always safe for cross-section data
- Clustered SE: use when observations are grouped (e.g., by firm, region, year)
- Newey-West SE: use for time series with autocorrelation
Quick Code Templates
Python (statsmodels)
import 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())
R
library(lmtest)
library(sandwich)
model <- lm(y ~ x1 + x2 + x3, data = df)
coeftest(model, vcov = vcovHC(model, type = "HC3"))
Stata
reg y x1 x2 x3, robust
Diagnostics Checklist
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 |
Reporting Standards (Academic)
- Report coefficients with standard errors in parentheses (or t-stats)
- Use asterisks for significance: * p<0.10, ** p<0.05, *** p<0.01
- Always state which standard errors are used (robust, clustered, etc.)
- Report R², adjusted R², N, and F-statistic
- Describe the identification strategy and potential endogeneity concerns
For detailed test formulas, code, and extended examples, see references/ols-reference.md.
Common Pitfalls
- Claiming causality without identification: OLS with controls does not establish causality — use IV, DID, or RDD for causal claims
- Using default SE with clustered data: Always cluster SE at the group level when observations are grouped
- Including "bad controls": Don't control for post-treatment variables (mediators) — they introduce collider bias
- Log-transforming variables with zeros: ln(0) is undefined; use asinh(x) or ln(x+1) with appropriate interpretation
- Reporting R² as evidence of a good model: High R² does not mean the model is correctly specified or causal
Related Skills & Commands
- panel-data: If your data has repeated observations on the same units
- iv-estimation: If you suspect endogeneity in your key regressor
- stats: Generate summary statistics before running regressions
- /diagnose: Run comprehensive diagnostic tests on your OLS model
- /robustness: Design robustness checks for your specifications
- /interpret: Get help interpreting regression output
- table: Format regression results for publication
Related Skills
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
149.0kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
