SkillsReviewed · jaechang-hits

Statsmodels Statistical Modeling

Statsmodels Statistical Modeling is an assistant skill for Python analysts, but some examples need correction before reuse. It provides guidance on regression, time series, statistical inference and model diagnostics using statsmodels.

Researched 16 Nov 2026

In short.

Statsmodels Statistical Modeling is a reference skill for AI assistants helping Python analysts, but its examples require code review and statistical judgment before reuse. It covers interpretable models, confidence intervals, diagnostics and forecasting. Visible issues include a missing import in a standalone recipe and inconsistent time-series seasonality. Runtime behavior and assistant compatibility are unverified, and the file-level license declaration differs from the repository notice.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the selected folder skills/biostatistics/statsmodels-statistical-modeling in jaechang-hits/SciAgent-Skills at revision 65d6ceb875e20b751ffb3a6d8ee19516558789e1. SKILL.md is the sole supplied file within that folder; the repository-level LICENSE is a related notice outside it. Other skills, referenced upstream projects, dependency implementations and linked documentation are outside this scope. No code was executed. Installation, assistant integration, package compatibility, forecasting performance and validity on real datasets remain unverified.

The overview

Identity

The resource is the statsmodels-statistical-modeling skill in jaechang-hits/SciAgent-Skills, under skills/biostatistics/statsmodels-statistical-modeling [https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/biostatistics/statsmodels-statistical-modeling]. Its supplied content is a SKILL.md instruction file with Python examples for the separate statsmodels package.

Assessment

The skill is a useful starting reference for drafting statistical analysis code that reports coefficients, uncertainty and diagnostic results. Its strongest feature is connecting model fitting with checks and interpretation, rather than stopping at a fitted model.

Several snippets need review before copying. The ANOVA recipe lacks a local import for a name it uses, and the seasonal forecasting example describes a different sampling frequency from its input. No code was executed, and the material provides no evidence of improved assistant performance or valid results on real datasets.

Users

It suits researchers, analysts and developers who use Python and need to explain statistical relationships, compare models or forecast a time series. Experienced users can treat it as a compact recipe reference. Beginners will need additional help with data preparation, model assumptions and interpretation; the examples do not establish whether a method is appropriate for a particular study.

Capabilities

Worked examples cover ordinary and weighted least squares, Poisson generalized linear models, logistic regression, ARIMA and SARIMAX forecasting, formula-based interactions, ANOVA with Tukey comparisons, power analysis and random-intercept mixed models.

Diagnostic examples include tests for unequal residual variance, residual normality and autocorrelation, plus variance inflation factors for correlated predictors. The file also names GLS, Probit, multinomial models and VAR, but does not provide worked implementations for those methods.

Using it

Requirements

The stated prerequisites are Python with statsmodels, NumPy, pandas and SciPy. Matplotlib supports plotting, and the guide identifies Patsy as supporting formula syntax and being included with statsmodels. Data is supplied as pandas DataFrames or NumPy arrays.

No Python or package versions, operating-system requirements, hardware minimums or supported assistant hosts are specified. Compatibility with a particular environment is unknown.

Mechanism

The skill supplies written guidance and code patterns for an assistant or developer to consult. Numerical calculations are performed by the installed Python libraries. The text directs users toward a model family, fitting method, diagnostic checks and interpretation.

Its formula examples express relationships such as y ~ x1 + x2 + C(group), where C(group) marks a categorical predictor. Array-based examples explicitly add an intercept. The supplied file contains no assistant integration code or demonstrated mechanism that enforces its recommendations.

Setup

The documented package command is pip install statsmodels numpy pandas matplotlib. SciPy is also listed among the prerequisites. The examples then import either statsmodels.api or statsmodels.formula.api.

The file does not explain how to install, register or activate this skill in a particular assistant. It provides no pinned environment or dependency lockfile. Installation success and host compatibility are unverified.

Example

The complete-regression workflow creates 200 synthetic rows and fits smf.ols("y ~ x1 + x2", data=df).fit(). It then applies the Breusch-Pagan test for unequal residual variance, conditionally refits with HC3 robust standard errors, checks variance inflation factors and prints a model summary with AIC and BIC.

This illustrates the intended sequence from fitting through diagnostics to reporting. The source supplies code, not observed output or evidence that this sequence produces valid conclusions for a real dataset.

Assessment & evidence

Limitations

Copied on its own, the ANOVA recipe references sm.stats.anova_lm without importing statsmodels.api as sm. The SARIMAX example describes monthly data with annual seasonality but reuses the preceding daily series; a seasonal period of 12 does not represent a year for that input.

Other examples simplify decisions that require justification. The WLS example derives weights from residuals without establishing a variance model. Some diagnostic results above a significance threshold are labeled OK, which does not prove that assumptions hold. The marginal-effects comment says at means, while get_margeff() specifies no evaluation setting. These details require review against the intended analysis and installed API.

Reasoning

The skill's practical value comes from pairing model choice with interpretation: match the method to the outcome, inspect assumptions and report effect sizes with uncertainty. This is relevant when the goal is understanding relationships rather than prediction alone.

The presence of these instructions does not establish that an assistant will follow them consistently or that a fitted model supports a study's conclusions. Those outcomes remain unverified.

Alternatives

The skill recommends scikit-learn for prediction-focused machine learning with cross-validation and hyperparameter tuning, and PyMC for Bayesian modeling with posterior inference. Its description points to a separate statistical-analysis skill for choosing statistical tests; that resource is outside the supplied scope.

For package-specific details, the skill links to the official statsmodels documentation [https://www.statsmodels.org/stable/], user guide [https://www.statsmodels.org/stable/user-guide.html] and API reference [https://www.statsmodels.org/stable/api.html]. Their contents are not included in the supplied evidence.

Evidence

The original skill text is available at the identified source revision [https://raw.githubusercontent.com/jaechang-hits/SciAgent-Skills/65d6ceb875e20b751ffb3a6d8ee19516558789e1/skills/biostatistics/statsmodels-statistical-modeling/SKILL.md]. The related repository notice is preserved separately [https://raw.githubusercontent.com/jaechang-hits/SciAgent-Skills/65d6ceb875e20b751ffb3a6d8ee19516558789e1/LICENSE].

These sources establish the written guidance, examples and license declarations. They contain no execution receipts, benchmark results, real-data evaluations or demonstrated assistant integrations.

Access & freshness

Costs

The supplied material gives no purchase price, subscription terms, paid API requirement or measured operating costs. Any assistant access and computing costs depend on the chosen environment. Total cost is unknown.

Rights

The repository LICENSE grants sharing and adaptation, including commercial use, under CC BY 4.0. It requires appropriate attribution, a license link and disclosure of changes, and prohibits additional restrictions [https://creativecommons.org/licenses/by/4.0/legalcode]. The skill's front matter instead declares BSD-3-Clause. The supplied notices do not explain how these declarations apply together or include a separate BSD notice, so the controlling terms for this file remain unclear.

The repository notice also acknowledges claude-scientific-skills under MIT and Biomni under Apache 2.0, and identifies a separate sgRNA guide as CC BY 4.0. It does not establish which upstream material, if any, contributed to this statsmodels skill.

Freshness

The supplied snapshot identifies revision 65d6ceb875e20b751ffb3a6d8ee19516558789e1, captured on 2026-11-16 at 13:31:00.225 UTC. This identifies the source snapshot, not a date when the examples were validated.

The skill specifies no statsmodels release or tested dependency versions. Compatibility with a user's installed release and changes after the identified revision are unknown.

Actions

Before reusing the examples, check the installed package documentation, make the ANOVA import self-contained, align SARIMAX seasonality with the observation frequency and confirm the intended marginal-effects setting.

For real analyses, justify the model assumptions and any WLS weights, and interpret diagnostic tests alongside the study design. Confirm which license applies to the skill before redistributing or adapting its text.

Evidence for this report

LICENSEnotice · checked 2026-11-16