diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-linearmodels.spec | 976 | ||||
| -rw-r--r-- | sources | 2 |
3 files changed, 490 insertions, 489 deletions
@@ -1 +1,2 @@ /linearmodels-4.27.tar.gz +/linearmodels-4.29.tar.gz diff --git a/python-linearmodels.spec b/python-linearmodels.spec index 9534c9b..61f0931 100644 --- a/python-linearmodels.spec +++ b/python-linearmodels.spec @@ -1,11 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-linearmodels -Version: 4.27 +Version: 4.29 Release: 1 Summary: Linear Panel, Instrumental Variable, Asset Pricing, and System Regression models for Python License: NCSA URL: http://github.com/bashtage/linearmodels -Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ab/db/dcd2f13a06cb7537b65464e3632f731ff6f4db344e0b9d6c8d8e3d95fe62/linearmodels-4.27.tar.gz +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b7/f4/c60c761f36efd875f5bd8df54f66e34f812bd472f960b2d5e6740c5b0fa1/linearmodels-4.29.tar.gz Requires: python3-numpy Requires: python3-pandas @@ -16,170 +16,170 @@ Requires: python3-mypy-extensions Requires: python3-Cython Requires: python3-pyhdfe Requires: python3-formulaic -Requires: python3-setuptools-scm +Requires: python3-setuptools-scm[toml] %description -# Linear Models - -| Metric | | -| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Latest Release** | [](https://badge.fury.io/py/linearmodels) | -| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) | -| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) | -| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) | -| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) | -| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) | -| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) | - -Linear (regression) models for Python. Extends -[statsmodels](http://www.statsmodels.org) with Panel regression, -instrumental variable estimators, system estimators and models for -estimating asset prices: - -- **Panel models**: - - Fixed effects (maximum two-way) - - First difference regression - - Between estimator for panel data - - Pooled regression for panel data - - Fama-MacBeth estimation of panel models - -- **High-dimensional Regresssion**: - - Absorbing Least Squares - -- **Instrumental Variable estimators** - - Two-stage Least Squares - - Limited Information Maximum Likelihood - - k-class Estimators - - Generalized Method of Moments, also with continuously updating - -- **Factor Asset Pricing Models**: - - 2- and 3-step estimation - - Time-series estimation - - GMM estimation - -- **System Regression**: - - Seemingly Unrelated Regression (SUR/SURE) - - Three-Stage Least Squares (3SLS) - - Generalized Method of Moments (GMM) System Estimation - -Designed to work equally well with NumPy, Pandas or xarray data. - -## Panel models - -Like [statsmodels](http://www.statsmodels.org) to include, supports -formulas for specifying models. For example, the classic Grunfeld regression can be -specified - -```python -import numpy as np -from statsmodels.datasets import grunfeld -data = grunfeld.load_pandas().data -data.year = data.year.astype(np.int64) -# MultiIndex, entity - time -data = data.set_index(['firm','year']) -from linearmodels import PanelOLS -mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -Models can also be specified using the formula interface. - -```python -from linearmodels import PanelOLS -mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -The formula interface for `PanelOLS` supports the special values -`EntityEffects` and `TimeEffects` which add entity (fixed) and time -effects, respectively. - -Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/) -package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/). - -## Instrumental Variable Models - -IV regression models can be similarly specified. - -```python -import numpy as np -from linearmodels.iv import IV2SLS -from linearmodels.datasets import mroz -data = mroz.load() -mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data) -``` - -The expressions in the `[ ]` indicate endogenous regressors (before `~`) -and the instruments. - -## Installing - -The latest release can be installed using pip - -```bash -pip install linearmodels -``` - -The main branch can be installed by cloning the repo and running setup - -```bash -git clone https://github.com/bashtage/linearmodels -cd linearmodels -pip install . -``` - -## Documentation - -[Stable Documentation](https://bashtage.github.io/linearmodels/) is -built on every tagged version using -[doctr](https://github.com/drdoctr/doctr). -[Development Documentation](https://bashtage.github.io/linearmodels/devel) -is automatically built on every successful build of main. - -## Plan and status - -Should eventually add some useful linear model estimators such as panel -regression. Currently only the single variable IV estimators are polished. - -- Linear Instrumental variable estimation - **complete** -- Linear Panel model estimation - **complete** -- Fama-MacBeth regression - **complete** -- Linear Factor Asset Pricing - **complete** -- System regression - **complete** -- Linear IV Panel model estimation - _not started_ -- Dynamic Panel model estimation - _not started_ - -## Requirements - -### Running - -With the exception of Python 3 (3.8+ tested), which is a hard requirement, the -others are the version that are being used in the test environment. It -is possible that older versions work. - -- Python 3.8+ -- NumPy (1.18+) -- SciPy (1.3+) -- pandas (1.0+) -- statsmodels (0.12+) -- xarray (0.16+, optional) -- Cython (0.29.24+, optional) - -### Testing - -- py.test - -### Documentation - -- sphinx -- sphinx-material -- nbsphinx -- nbconvert -- nbformat -- ipython -- jupyter +# Linear Models
+
+| Metric | |
+| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Latest Release** | [](https://badge.fury.io/py/linearmodels) |
+| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) |
+| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) |
+| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) |
+| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) |
+| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) |
+| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) |
+
+Linear (regression) models for Python. Extends
+[statsmodels](http://www.statsmodels.org) with Panel regression,
+instrumental variable estimators, system estimators and models for
+estimating asset prices:
+
+- **Panel models**:
+ - Fixed effects (maximum two-way)
+ - First difference regression
+ - Between estimator for panel data
+ - Pooled regression for panel data
+ - Fama-MacBeth estimation of panel models
+
+- **High-dimensional Regresssion**:
+ - Absorbing Least Squares
+
+- **Instrumental Variable estimators**
+ - Two-stage Least Squares
+ - Limited Information Maximum Likelihood
+ - k-class Estimators
+ - Generalized Method of Moments, also with continuously updating
+
+- **Factor Asset Pricing Models**:
+ - 2- and 3-step estimation
+ - Time-series estimation
+ - GMM estimation
+
+- **System Regression**:
+ - Seemingly Unrelated Regression (SUR/SURE)
+ - Three-Stage Least Squares (3SLS)
+ - Generalized Method of Moments (GMM) System Estimation
+
+Designed to work equally well with NumPy, Pandas or xarray data.
+
+## Panel models
+
+Like [statsmodels](http://www.statsmodels.org) to include, supports
+formulas for specifying models. For example, the classic Grunfeld regression can be
+specified
+
+```python
+import numpy as np
+from statsmodels.datasets import grunfeld
+data = grunfeld.load_pandas().data
+data.year = data.year.astype(np.int64)
+# MultiIndex, entity - time
+data = data.set_index(['firm','year'])
+from linearmodels import PanelOLS
+mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+Models can also be specified using the formula interface.
+
+```python
+from linearmodels import PanelOLS
+mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+The formula interface for `PanelOLS` supports the special values
+`EntityEffects` and `TimeEffects` which add entity (fixed) and time
+effects, respectively.
+
+Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/)
+package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/).
+
+## Instrumental Variable Models
+
+IV regression models can be similarly specified.
+
+```python
+import numpy as np
+from linearmodels.iv import IV2SLS
+from linearmodels.datasets import mroz
+data = mroz.load()
+mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data)
+```
+
+The expressions in the `[ ]` indicate endogenous regressors (before `~`)
+and the instruments.
+
+## Installing
+
+The latest release can be installed using pip
+
+```bash
+pip install linearmodels
+```
+
+The main branch can be installed by cloning the repo and running setup
+
+```bash
+git clone https://github.com/bashtage/linearmodels
+cd linearmodels
+pip install .
+```
+
+## Documentation
+
+[Stable Documentation](https://bashtage.github.io/linearmodels/) is
+built on every tagged version using
+[doctr](https://github.com/drdoctr/doctr).
+[Development Documentation](https://bashtage.github.io/linearmodels/devel)
+is automatically built on every successful build of main.
+
+## Plan and status
+
+Should eventually add some useful linear model estimators such as panel
+regression. Currently only the single variable IV estimators are polished.
+
+- Linear Instrumental variable estimation - **complete**
+- Linear Panel model estimation - **complete**
+- Fama-MacBeth regression - **complete**
+- Linear Factor Asset Pricing - **complete**
+- System regression - **complete**
+- Linear IV Panel model estimation - _not started_
+- Dynamic Panel model estimation - _not started_
+
+## Requirements
+
+### Running
+
+With the exception of Python 3 (3.8+ tested), which is a hard requirement, the
+others are the version that are being used in the test environment. It
+is possible that older versions work.
+
+- Python 3.8+
+- NumPy (1.18+)
+- SciPy (1.3+)
+- pandas (1.0+)
+- statsmodels (0.12+)
+- xarray (0.16+, optional)
+- Cython (0.29.24+, optional)
+
+### Testing
+
+- py.test
+
+### Documentation
+
+- sphinx
+- sphinx-material
+- nbsphinx
+- nbconvert
+- nbformat
+- ipython
+- jupyter
%package -n python3-linearmodels @@ -192,338 +192,338 @@ BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-linearmodels -# Linear Models - -| Metric | | -| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Latest Release** | [](https://badge.fury.io/py/linearmodels) | -| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) | -| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) | -| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) | -| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) | -| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) | -| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) | - -Linear (regression) models for Python. Extends -[statsmodels](http://www.statsmodels.org) with Panel regression, -instrumental variable estimators, system estimators and models for -estimating asset prices: - -- **Panel models**: - - Fixed effects (maximum two-way) - - First difference regression - - Between estimator for panel data - - Pooled regression for panel data - - Fama-MacBeth estimation of panel models - -- **High-dimensional Regresssion**: - - Absorbing Least Squares - -- **Instrumental Variable estimators** - - Two-stage Least Squares - - Limited Information Maximum Likelihood - - k-class Estimators - - Generalized Method of Moments, also with continuously updating - -- **Factor Asset Pricing Models**: - - 2- and 3-step estimation - - Time-series estimation - - GMM estimation - -- **System Regression**: - - Seemingly Unrelated Regression (SUR/SURE) - - Three-Stage Least Squares (3SLS) - - Generalized Method of Moments (GMM) System Estimation - -Designed to work equally well with NumPy, Pandas or xarray data. - -## Panel models - -Like [statsmodels](http://www.statsmodels.org) to include, supports -formulas for specifying models. For example, the classic Grunfeld regression can be -specified - -```python -import numpy as np -from statsmodels.datasets import grunfeld -data = grunfeld.load_pandas().data -data.year = data.year.astype(np.int64) -# MultiIndex, entity - time -data = data.set_index(['firm','year']) -from linearmodels import PanelOLS -mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -Models can also be specified using the formula interface. - -```python -from linearmodels import PanelOLS -mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -The formula interface for `PanelOLS` supports the special values -`EntityEffects` and `TimeEffects` which add entity (fixed) and time -effects, respectively. - -Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/) -package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/). - -## Instrumental Variable Models - -IV regression models can be similarly specified. - -```python -import numpy as np -from linearmodels.iv import IV2SLS -from linearmodels.datasets import mroz -data = mroz.load() -mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data) -``` - -The expressions in the `[ ]` indicate endogenous regressors (before `~`) -and the instruments. - -## Installing - -The latest release can be installed using pip - -```bash -pip install linearmodels -``` - -The main branch can be installed by cloning the repo and running setup - -```bash -git clone https://github.com/bashtage/linearmodels -cd linearmodels -pip install . -``` - -## Documentation - -[Stable Documentation](https://bashtage.github.io/linearmodels/) is -built on every tagged version using -[doctr](https://github.com/drdoctr/doctr). -[Development Documentation](https://bashtage.github.io/linearmodels/devel) -is automatically built on every successful build of main. - -## Plan and status - -Should eventually add some useful linear model estimators such as panel -regression. Currently only the single variable IV estimators are polished. - -- Linear Instrumental variable estimation - **complete** -- Linear Panel model estimation - **complete** -- Fama-MacBeth regression - **complete** -- Linear Factor Asset Pricing - **complete** -- System regression - **complete** -- Linear IV Panel model estimation - _not started_ -- Dynamic Panel model estimation - _not started_ - -## Requirements - -### Running - -With the exception of Python 3 (3.8+ tested), which is a hard requirement, the -others are the version that are being used in the test environment. It -is possible that older versions work. - -- Python 3.8+ -- NumPy (1.18+) -- SciPy (1.3+) -- pandas (1.0+) -- statsmodels (0.12+) -- xarray (0.16+, optional) -- Cython (0.29.24+, optional) - -### Testing - -- py.test - -### Documentation - -- sphinx -- sphinx-material -- nbsphinx -- nbconvert -- nbformat -- ipython -- jupyter +# Linear Models
+
+| Metric | |
+| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Latest Release** | [](https://badge.fury.io/py/linearmodels) |
+| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) |
+| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) |
+| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) |
+| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) |
+| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) |
+| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) |
+
+Linear (regression) models for Python. Extends
+[statsmodels](http://www.statsmodels.org) with Panel regression,
+instrumental variable estimators, system estimators and models for
+estimating asset prices:
+
+- **Panel models**:
+ - Fixed effects (maximum two-way)
+ - First difference regression
+ - Between estimator for panel data
+ - Pooled regression for panel data
+ - Fama-MacBeth estimation of panel models
+
+- **High-dimensional Regresssion**:
+ - Absorbing Least Squares
+
+- **Instrumental Variable estimators**
+ - Two-stage Least Squares
+ - Limited Information Maximum Likelihood
+ - k-class Estimators
+ - Generalized Method of Moments, also with continuously updating
+
+- **Factor Asset Pricing Models**:
+ - 2- and 3-step estimation
+ - Time-series estimation
+ - GMM estimation
+
+- **System Regression**:
+ - Seemingly Unrelated Regression (SUR/SURE)
+ - Three-Stage Least Squares (3SLS)
+ - Generalized Method of Moments (GMM) System Estimation
+
+Designed to work equally well with NumPy, Pandas or xarray data.
+
+## Panel models
+
+Like [statsmodels](http://www.statsmodels.org) to include, supports
+formulas for specifying models. For example, the classic Grunfeld regression can be
+specified
+
+```python
+import numpy as np
+from statsmodels.datasets import grunfeld
+data = grunfeld.load_pandas().data
+data.year = data.year.astype(np.int64)
+# MultiIndex, entity - time
+data = data.set_index(['firm','year'])
+from linearmodels import PanelOLS
+mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+Models can also be specified using the formula interface.
+
+```python
+from linearmodels import PanelOLS
+mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+The formula interface for `PanelOLS` supports the special values
+`EntityEffects` and `TimeEffects` which add entity (fixed) and time
+effects, respectively.
+
+Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/)
+package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/).
+
+## Instrumental Variable Models
+
+IV regression models can be similarly specified.
+
+```python
+import numpy as np
+from linearmodels.iv import IV2SLS
+from linearmodels.datasets import mroz
+data = mroz.load()
+mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data)
+```
+
+The expressions in the `[ ]` indicate endogenous regressors (before `~`)
+and the instruments.
+
+## Installing
+
+The latest release can be installed using pip
+
+```bash
+pip install linearmodels
+```
+
+The main branch can be installed by cloning the repo and running setup
+
+```bash
+git clone https://github.com/bashtage/linearmodels
+cd linearmodels
+pip install .
+```
+
+## Documentation
+
+[Stable Documentation](https://bashtage.github.io/linearmodels/) is
+built on every tagged version using
+[doctr](https://github.com/drdoctr/doctr).
+[Development Documentation](https://bashtage.github.io/linearmodels/devel)
+is automatically built on every successful build of main.
+
+## Plan and status
+
+Should eventually add some useful linear model estimators such as panel
+regression. Currently only the single variable IV estimators are polished.
+
+- Linear Instrumental variable estimation - **complete**
+- Linear Panel model estimation - **complete**
+- Fama-MacBeth regression - **complete**
+- Linear Factor Asset Pricing - **complete**
+- System regression - **complete**
+- Linear IV Panel model estimation - _not started_
+- Dynamic Panel model estimation - _not started_
+
+## Requirements
+
+### Running
+
+With the exception of Python 3 (3.8+ tested), which is a hard requirement, the
+others are the version that are being used in the test environment. It
+is possible that older versions work.
+
+- Python 3.8+
+- NumPy (1.18+)
+- SciPy (1.3+)
+- pandas (1.0+)
+- statsmodels (0.12+)
+- xarray (0.16+, optional)
+- Cython (0.29.24+, optional)
+
+### Testing
+
+- py.test
+
+### Documentation
+
+- sphinx
+- sphinx-material
+- nbsphinx
+- nbconvert
+- nbformat
+- ipython
+- jupyter
%package help Summary: Development documents and examples for linearmodels Provides: python3-linearmodels-doc %description help -# Linear Models - -| Metric | | -| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Latest Release** | [](https://badge.fury.io/py/linearmodels) | -| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) | -| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) | -| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) | -| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) | -| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) | -| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) | -| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) | - -Linear (regression) models for Python. Extends -[statsmodels](http://www.statsmodels.org) with Panel regression, -instrumental variable estimators, system estimators and models for -estimating asset prices: - -- **Panel models**: - - Fixed effects (maximum two-way) - - First difference regression - - Between estimator for panel data - - Pooled regression for panel data - - Fama-MacBeth estimation of panel models - -- **High-dimensional Regresssion**: - - Absorbing Least Squares - -- **Instrumental Variable estimators** - - Two-stage Least Squares - - Limited Information Maximum Likelihood - - k-class Estimators - - Generalized Method of Moments, also with continuously updating - -- **Factor Asset Pricing Models**: - - 2- and 3-step estimation - - Time-series estimation - - GMM estimation - -- **System Regression**: - - Seemingly Unrelated Regression (SUR/SURE) - - Three-Stage Least Squares (3SLS) - - Generalized Method of Moments (GMM) System Estimation - -Designed to work equally well with NumPy, Pandas or xarray data. - -## Panel models - -Like [statsmodels](http://www.statsmodels.org) to include, supports -formulas for specifying models. For example, the classic Grunfeld regression can be -specified - -```python -import numpy as np -from statsmodels.datasets import grunfeld -data = grunfeld.load_pandas().data -data.year = data.year.astype(np.int64) -# MultiIndex, entity - time -data = data.set_index(['firm','year']) -from linearmodels import PanelOLS -mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -Models can also be specified using the formula interface. - -```python -from linearmodels import PanelOLS -mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data) -res = mod.fit(cov_type='clustered', cluster_entity=True) -``` - -The formula interface for `PanelOLS` supports the special values -`EntityEffects` and `TimeEffects` which add entity (fixed) and time -effects, respectively. - -Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/) -package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/). - -## Instrumental Variable Models - -IV regression models can be similarly specified. - -```python -import numpy as np -from linearmodels.iv import IV2SLS -from linearmodels.datasets import mroz -data = mroz.load() -mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data) -``` - -The expressions in the `[ ]` indicate endogenous regressors (before `~`) -and the instruments. - -## Installing - -The latest release can be installed using pip - -```bash -pip install linearmodels -``` - -The main branch can be installed by cloning the repo and running setup - -```bash -git clone https://github.com/bashtage/linearmodels -cd linearmodels -pip install . -``` - -## Documentation - -[Stable Documentation](https://bashtage.github.io/linearmodels/) is -built on every tagged version using -[doctr](https://github.com/drdoctr/doctr). -[Development Documentation](https://bashtage.github.io/linearmodels/devel) -is automatically built on every successful build of main. - -## Plan and status - -Should eventually add some useful linear model estimators such as panel -regression. Currently only the single variable IV estimators are polished. - -- Linear Instrumental variable estimation - **complete** -- Linear Panel model estimation - **complete** -- Fama-MacBeth regression - **complete** -- Linear Factor Asset Pricing - **complete** -- System regression - **complete** -- Linear IV Panel model estimation - _not started_ -- Dynamic Panel model estimation - _not started_ - -## Requirements - -### Running - -With the exception of Python 3 (3.8+ tested), which is a hard requirement, the -others are the version that are being used in the test environment. It -is possible that older versions work. - -- Python 3.8+ -- NumPy (1.18+) -- SciPy (1.3+) -- pandas (1.0+) -- statsmodels (0.12+) -- xarray (0.16+, optional) -- Cython (0.29.24+, optional) - -### Testing - -- py.test - -### Documentation - -- sphinx -- sphinx-material -- nbsphinx -- nbconvert -- nbformat -- ipython -- jupyter +# Linear Models
+
+| Metric | |
+| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Latest Release** | [](https://badge.fury.io/py/linearmodels) |
+| **Continuous Integration** | [](https://dev.azure.com/kevinksheppard/kevinksheppard/_build/latest?definitionId=2&branchName=main) |
+| | [](https://ci.appveyor.com/project/bashtage/linearmodels/branch/main) |
+| **Coverage** | [](https://codecov.io/gh/bashtage/linearmodels) |
+| **Code Quality** | [](https://www.codacy.com/manual/bashtage/linearmodels?utm_source=github.com&utm_medium=referral&utm_content=bashtage/linearmodels&utm_campaign=Badge_Grade) |
+| | [](https://codebeat.co/projects/github-com-bashtage-linearmodels-main) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/context:python) |
+| | [](https://lgtm.com/projects/g/bashtage/linearmodels/alerts) |
+| **Citation** | [](https://zenodo.org/badge/latestdoi/82291672) |
+
+Linear (regression) models for Python. Extends
+[statsmodels](http://www.statsmodels.org) with Panel regression,
+instrumental variable estimators, system estimators and models for
+estimating asset prices:
+
+- **Panel models**:
+ - Fixed effects (maximum two-way)
+ - First difference regression
+ - Between estimator for panel data
+ - Pooled regression for panel data
+ - Fama-MacBeth estimation of panel models
+
+- **High-dimensional Regresssion**:
+ - Absorbing Least Squares
+
+- **Instrumental Variable estimators**
+ - Two-stage Least Squares
+ - Limited Information Maximum Likelihood
+ - k-class Estimators
+ - Generalized Method of Moments, also with continuously updating
+
+- **Factor Asset Pricing Models**:
+ - 2- and 3-step estimation
+ - Time-series estimation
+ - GMM estimation
+
+- **System Regression**:
+ - Seemingly Unrelated Regression (SUR/SURE)
+ - Three-Stage Least Squares (3SLS)
+ - Generalized Method of Moments (GMM) System Estimation
+
+Designed to work equally well with NumPy, Pandas or xarray data.
+
+## Panel models
+
+Like [statsmodels](http://www.statsmodels.org) to include, supports
+formulas for specifying models. For example, the classic Grunfeld regression can be
+specified
+
+```python
+import numpy as np
+from statsmodels.datasets import grunfeld
+data = grunfeld.load_pandas().data
+data.year = data.year.astype(np.int64)
+# MultiIndex, entity - time
+data = data.set_index(['firm','year'])
+from linearmodels import PanelOLS
+mod = PanelOLS(data.invest, data[['value','capital']], entity_effects=True)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+Models can also be specified using the formula interface.
+
+```python
+from linearmodels import PanelOLS
+mod = PanelOLS.from_formula('invest ~ value + capital + EntityEffects', data)
+res = mod.fit(cov_type='clustered', cluster_entity=True)
+```
+
+The formula interface for `PanelOLS` supports the special values
+`EntityEffects` and `TimeEffects` which add entity (fixed) and time
+effects, respectively.
+
+Formula support comes from the [formulaic](https://github.com/matthewwardrop/formulaic/)
+package which is a replacement for [patsy](https://patsy.readthedocs.io/en/latest/).
+
+## Instrumental Variable Models
+
+IV regression models can be similarly specified.
+
+```python
+import numpy as np
+from linearmodels.iv import IV2SLS
+from linearmodels.datasets import mroz
+data = mroz.load()
+mod = IV2SLS.from_formula('np.log(wage) ~ 1 + exper + exper ** 2 + [educ ~ motheduc + fatheduc]', data)
+```
+
+The expressions in the `[ ]` indicate endogenous regressors (before `~`)
+and the instruments.
+
+## Installing
+
+The latest release can be installed using pip
+
+```bash
+pip install linearmodels
+```
+
+The main branch can be installed by cloning the repo and running setup
+
+```bash
+git clone https://github.com/bashtage/linearmodels
+cd linearmodels
+pip install .
+```
+
+## Documentation
+
+[Stable Documentation](https://bashtage.github.io/linearmodels/) is
+built on every tagged version using
+[doctr](https://github.com/drdoctr/doctr).
+[Development Documentation](https://bashtage.github.io/linearmodels/devel)
+is automatically built on every successful build of main.
+
+## Plan and status
+
+Should eventually add some useful linear model estimators such as panel
+regression. Currently only the single variable IV estimators are polished.
+
+- Linear Instrumental variable estimation - **complete**
+- Linear Panel model estimation - **complete**
+- Fama-MacBeth regression - **complete**
+- Linear Factor Asset Pricing - **complete**
+- System regression - **complete**
+- Linear IV Panel model estimation - _not started_
+- Dynamic Panel model estimation - _not started_
+
+## Requirements
+
+### Running
+
+With the exception of Python 3 (3.8+ tested), which is a hard requirement, the
+others are the version that are being used in the test environment. It
+is possible that older versions work.
+
+- Python 3.8+
+- NumPy (1.18+)
+- SciPy (1.3+)
+- pandas (1.0+)
+- statsmodels (0.12+)
+- xarray (0.16+, optional)
+- Cython (0.29.24+, optional)
+
+### Testing
+
+- py.test
+
+### Documentation
+
+- sphinx
+- sphinx-material
+- nbsphinx
+- nbconvert
+- nbformat
+- ipython
+- jupyter
%prep -%autosetup -n linearmodels-4.27 +%autosetup -n linearmodels-4.29 %build %py3_build @@ -563,5 +563,5 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog -* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.27-1 +* Sun Apr 23 2023 Python_Bot <Python_Bot@openeuler.org> - 4.29-1 - Package Spec generated @@ -1 +1 @@ -a54a92cce98caf8378c7dbb725cfb89d linearmodels-4.27.tar.gz +f0d7c1b734626680ca1540399451a1cb linearmodels-4.29.tar.gz |
