# bashtage/linearmodels

Additional linear models including instrumental variable and panel data models that are missing from statsmodels.

Repository: https://github.com/bashtage/linearmodels
Canonical: https://ross.abutalabs.com/products/linearmodels
Homepage: https://bashtage.github.io/linearmodels/
Language: Python
License: NCSA
License Family: other
Topics: iv, instrumental-variable, panel, regression, statistical-model, ols, gmm, fixed-effects, random-effects, between-estimator, first-difference, clustered-standard-errors, pooled-ols, linear-models, panel-data, panel-models, panel-regression, fama-macbeth, asset-pricing, seemingly-unrelated-regression
Last push: 2026-08-31T14:54:43+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 100, release rhythm 21, longevity 100
- inputs: {"age_days": 3484, "days_push": 2, "days_rel": 316, "gap_med": 392, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1065, forks 198 (observed 2026-09-01T02:13:59.152279+00:00)

## What it is
A Python library extending statsmodels with linear regression models for panel data, instrumental variables, system regression, and asset pricing. It provides estimators such as fixed effects, Fama-MacBeth, 2SLS, LIML, GMM, SUR, and 3SLS with robust covariance options.

## Use cases
- estimate fixed effects panel regressions in python
- run instrumental variable two-stage least squares estimation
- compute fama-macbeth regressions for asset pricing
- fit seemingly unrelated regression (SUR) models
- estimate panel data models with clustered standard errors
- perform GMM estimation for linear models
- run three-stage least squares system regression

## When to choose
- you need panel data or IV estimators missing from statsmodels
- you want econometric linear models with a statsmodels-like API
- you need asset pricing factor model estimation and testing

## When to avoid
- you need nonlinear models like logit or probit
- you need Bayesian or machine-learning regression methods
- you need a GUI or point-and-click econometrics tool

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science, math
- domain: data-science, analytics
- platform: python, cross-platform
- tags: econometrics, panel-data, instrumental-variables, regression, asset-pricing, statsmodels, gmm, fixed-effects, statistics

## Member repositories
- bashtage/linearmodels (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:13:59.152279+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:55:48.437502+00:00, confidence not recorded.
  - readme: https://github.com/bashtage/linearmodels (fetched 2026-09-01T02:13:59.152279+00:00, sha 8c8a9faf0fc6)
  - homepage: https://bashtage.github.io/linearmodels/ (fetched 2026-08-29T12:57:58.723665+00:00, sha 64ec4795b937)
  - registry_pypi: https://pypi.org/pypi/linearmodels/json (fetched 2026-08-29T12:57:58.732656+00:00, sha bc870afb3f77)
- Data as of 2026-08-30T08:39:29.467469+00:00.
