econometricsmodels
A Python API providing statistical and econometric analysis methods. It is primarily intended for use as the analysis engine for economicon, a GUI application for data analysis, and its design prioritizes ease of embedding from scripts and programs (type completion, validation, dynamic construction).
- The computational core is implemented in Rust and thinly bound to Python via PyO3.
- Data input is restricted to polars DataFrames only, passed to the Rust side via Arrow zero-copy.
- Formula-string parsing (e.g.
y ~ x1 + x2) is not used. The dependent variable is passed as a single column name (str), independent variables as a list of column names (list[str]), and estimation options as an instance of a dedicated class.
Installation
pip install econometricsmodels
Requires Python 3.12 or later.
Quickstart
import polars as pl
from econometricsmodels import OLS
df = pl.DataFrame(
{
"y": [2.1, 3.9, 6.2, 8.1, 9.8],
"x1": [1.0, 2.0, 3.0, 4.0, 5.0],
}
)
result = OLS(df, y="y", x=["x1"]).fit()
print(result.params) # {"const": ..., "x1": ...}
print(result.std_errors) # {"const": ..., "x1": ...}
print(result.r_squared)
For more details — including how to switch to heteroskedasticity-robust standard errors (HC0-HC3), cluster-robust standard errors, and HAC (Newey-West) standard errors — see the documentation site. The full documentation, including the API reference, is published at https://masahiroyecon1997dev.github.io/econometricsmodels/.
Implementation status
Implemented: OLS (Ordinary Least Squares), WLS (Weighted Least Squares).
In progress: Logit.
Planned next, in this order: Probit → Tobit → IV (2SLS/GMM) → FE (Fixed Effects) → RE (Random Effects) → GLS.
During the 0.x.x pre-release period, breaking changes may occur even in minor version bumps.
Verification accuracy
Estimates for each implemented method (coefficients, standard errors, confidence intervals, R², adjusted R², AIC, BIC, log-likelihood, F-statistic, F-test p-value) are verified by numerical comparison against reference implementations. In addition to a primary reference, an independent implementation is used as a cross-check.
cov_type |
Primary reference | Independent cross-check |
|---|---|---|
| classical / HC0-3 / cluster | statsmodels (relative tolerance 1e-8) | R (lm/lm(weights=) + sandwich/lmtest, relative tolerance 1e-8) |
| HAC (Newey-West) | statsmodels (relative tolerance 1e-8) | R (relative tolerance 1e-2 for OLS, 5e-2 for WLS — looser due to differing small-sample correction conventions) |
License
Metadata
Release files for econometricsmodels 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| econometricsmodels-0.3.0.tar.gz | 187.9 kB | Details |
Built distributions (wheels)
Total release size: 68.7 MB
Release files / econometricsmodels-0.3.0.tar.gz
| Download URL | econometricsmodels-0.3.0.tar.gz |
|---|---|
| Size | 187.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01dababb6c54e12bc9c5eeda9089865a98b221bfec95989090d483b460902fe9
|
|
BLAKE2b-256 checksum How to use checksums |
9b1600854e770d405fa74631aaf0424539edbd49c07844ae3ff7f26e78b14cd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp314-cp314-win_amd64.whl
| Download URL | econometricsmodels-0.3.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c94c31ad6c095d67b7e27a22641e49678dbefadc0afc2ab2065cc0123f357d0c
|
|
BLAKE2b-256 checksum How to use checksums |
130620c2cd2d069039ab6d57cb6eea31e985fdfd6aef6c176dac70770c51d3f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
087d3ef437e4d1c36574495d2c557121b8dd55076f7a4853b37a61edcfe24462
|
|
BLAKE2b-256 checksum How to use checksums |
20092894587d714e916d30c541bf61de6fd76ccee36d672758a253d413e10b81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | econometricsmodels-0.3.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
efead2fe396e7b39d6e6220a1a193760afdf39e063935d7131dbed36a8e4805f
|
|
BLAKE2b-256 checksum How to use checksums |
bfa5a7296bbcc0e673531da94c75d8aeab5fdc0ac52c3af5424da6e99a7c3c44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp314-cp314-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.14 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a7ed80c81618c950d8ce76ea0c2392082b2a347a080acced818b7018842b58de
|
|
BLAKE2b-256 checksum How to use checksums |
7e87907186db4def850bd64c16f6cc7386711125a3345dfe5c75ab008c5c05d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp313-cp313-win_amd64.whl
| Download URL | econometricsmodels-0.3.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e3b00d56cc6a673222aacf188a8beabd452cde13a85c1d31ea63f99f372a1aa8
|
|
BLAKE2b-256 checksum How to use checksums |
0e3104dcbb6107035bc683e358c330e8b277eb827bee4b0231886b97bbcd062e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e85f19cc55199badd8bbcc68f2ca8f32e66bd69131b4d47fb41423f67653016d
|
|
BLAKE2b-256 checksum How to use checksums |
7173433e487ba83db144a14499f176d68ca36450148a72a7fba40bdbd7cc739a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | econometricsmodels-0.3.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b12b3a04593c6f69145a02aeec84250e471ed8df46478a2d42afa8d2c8ad59ce
|
|
BLAKE2b-256 checksum How to use checksums |
9083a2781da1df4a1f7ef81035509aae82913c1d5ac431861a9c9434418db460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ee765cd336eb4aa8a895cdb7925d58d72e36bf8dd4fa9b5dfa2ec1e7bacf754b
|
|
BLAKE2b-256 checksum How to use checksums |
ad6a2a0e1042ed55b8f9137ab13f1235b19791c4a024f785456668692b83aa90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp312-cp312-win_amd64.whl
| Download URL | econometricsmodels-0.3.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2ab4ce548e1bca3c9289b32f94828d544e896bcd75d5720d6015b393de88fbb8
|
|
BLAKE2b-256 checksum How to use checksums |
1e7fd582d47a187573c17bf9847b472c72d630b75768ee71c3e78912f66ce859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ce56431b5c322ccd23095fb972243195e6e070e0a3cef39ce26105d4fefd51e1
|
|
BLAKE2b-256 checksum How to use checksums |
ee050a66f603e5a5fd5b5c06f3bdbc18d865dfb9c7a4af1c60c9aa286ede56f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | econometricsmodels-0.3.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a61c50b92fa4846ad42f764f5497b9a36075e0f5be67f359484c15f26a51b39a
|
|
BLAKE2b-256 checksum How to use checksums |
8b7db3d3cc731d9b91aed9a87a20093484ad48d39415cf38d22387166930b4e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / econometricsmodels-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | econometricsmodels-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
584d5102f584d31f4083c4327d2b97d7cbee86e10e1064fcd121870cdbce026a
|
|
BLAKE2b-256 checksum How to use checksums |
deba7206d2feb87efbe6538c4dbd6e18ce422ffa4d86318b482a518520ddff11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency log