summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-12-28 15:05:55 -0800
committerYuri Victorovich <yuri@FreeBSD.org>2022-12-28 15:06:23 -0800
commitded602750874a4c59cab2d85c08d52df1bc28a99 (patch)
tree0b65944a43e7e5d2c6bd39edb194c0a5c284900d /math
parentmath/py-pyhdfe: New port: High dimensional fixed effect absorption (diff)
math/py-linearmodels: New port: Linear Panel, Instrumental Variable, Asset Pricing and other models
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/py-linearmodels/Makefile32
-rw-r--r--math/py-linearmodels/distinfo3
-rw-r--r--math/py-linearmodels/pkg-descr24
4 files changed, 60 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index d407c51b0a7e..904c444a9326 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -932,6 +932,7 @@
SUBDIR += py-kiwisolver
SUBDIR += py-levmar
SUBDIR += py-libpoly
+ SUBDIR += py-linearmodels
SUBDIR += py-lmfit
SUBDIR += py-luminol
SUBDIR += py-mathics
diff --git a/math/py-linearmodels/Makefile b/math/py-linearmodels/Makefile
new file mode 100644
index 000000000000..b302e56c4031
--- /dev/null
+++ b/math/py-linearmodels/Makefile
@@ -0,0 +1,32 @@
+PORTNAME= linearmodels
+PORTVERSION= 4.27
+CATEGORIES= math python # statistics
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Linear Panel, Instrumental Variable, Asset Pricing and other models
+WWW= https://bashtage.github.io/linearmodels/
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}formulaic>=0.3.2:math/py-formulaic@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}mypy_extensions>=0.4:devel/py-mypy_extensions@${PY_FLAVOR} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}pandas>=0.24:math/py-pandas@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}property-cached>=1.6.3:devel/py-property-cached@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyhdfe>=0.1:math/py-pyhdfe@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>=1.2:science/py-scipy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}statsmodels>=0.11:math/py-statsmodels@${PY_FLAVOR}
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=6.4.2,<7.0.0:devel/py-setuptools_scm@${PY_FLAVOR} \
+ ${PY_DEPENDS}
+RUN_DEPENDS= ${PY_DEPENDS}
+
+USES= python:3.7+ shebangfix
+USE_PYTHON= autoplist cython distutils
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/linearmodels/panel/_utility${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/math/py-linearmodels/distinfo b/math/py-linearmodels/distinfo
new file mode 100644
index 000000000000..a17850b99810
--- /dev/null
+++ b/math/py-linearmodels/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1672264555
+SHA256 (linearmodels-4.27.tar.gz) = 1e2ddd4ee82f46b003633136c1170206a90406a45ef1217d3fade30bb1407ccd
+SIZE (linearmodels-4.27.tar.gz) = 1778740
diff --git a/math/py-linearmodels/pkg-descr b/math/py-linearmodels/pkg-descr
new file mode 100644
index 000000000000..b3b8af3056c2
--- /dev/null
+++ b/math/py-linearmodels/pkg-descr
@@ -0,0 +1,24 @@
+Linear (regression) models for Python. Extends statsmodels 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