Version 4¶
Version 4.31¶
- Updated formulaic support of 0.6.0 and added optional support for not sorting variables from formulas. The default will continue to sort variables. You can enable the future behavior now using 
from linearmodels.__future__ import ordering
- The key difference between the old and the new behavior is that the old would reorder the variables in a formula so that - y ~ 1 + x + z + wwould return parameter estimates in the order- 1,- w,- x,- zdue to sorting. The new behavior will default to not sorting so that when using- y ~ 1 + x + z + wwill return parameter estimates in the order- 1,- x,- z,- w.
Version 4.30¶
- Improved compatability with unreleased versions of NumPy and pandas. 
Version 4.29¶
- Added average \(R^2\) and average adjusted \(R^2\) properties to - FamaMacBethResultsas- avg_rsquared()and- avg_adj_rsquared().
- Initial compatability with pandas 2.0 Copy-on-Write feature. 
Version 4.28¶
- Expanded compatability for formulaic from 0.3.2 to 0.5.2 
- Fixed a few issues related to pandas 2.0 
- Added tests and wheel support for Python 3.11 
Version 4.27¶
- Switched from patsy for formulaic for linear constraint translation when using the formula interface. This allows formulas to be specified using a dictionary of constraints in addition to the standard single string of list of strings (GH439, GH440). 
- Fixed a bug when using escaped variable names, e.g., - y ~ 1 + `x 3`, in panel data models (GH435).
- Fixed a bug that affected creating IV models using formulas with missing data (GH438). 
- Fixed examples in documentation (GH434). 
Version 4.26¶
- Fixed a bug in - IV2SLSand related models where- predict()would produce- NaNvalues when- exogand- endoghad different indices. An- IndexWarningis now shown.
- Added - stacklevelto all warnings to improve accuracy of warning location.
Version 4.25¶
- Clarified the null in the F-statistic 
- Improved the error message when dependent and exog have different numbers of observations 
- Added formulaic as the preferred formula parser 
- Fixed a bug in - ACCovarianceestimator where the number of observations was incorrectly overwritten
- Fixed a bug in - linearmodels.panel.results.PanelResults.corr_squared_between(),- linearmodels.panel.results.PanelResults.corr_squared_overall(), and- linearmodels.panel.results.PanelResults.corr_squared_within()where the correlation was not squared.
Version 4.24¶
- Added - breusch_pagan()and- likelihood_ratio()to test whether the shock covariance is diagonal.
Version 4.21¶
- Fixed a bug that affected - SURwhen estimating models using- method="gls"and heteroskedasticity-, hac, or cluster-robust inference.
- Added - rank_checkargument to panel-data models that allows the rank check to be skipped. Estimating a model that is rank deficient may result in unreliable estimates and so caution is needed if using this option.
- Changed the rank check to use - numpy.linalg.lstsq()which is better aligned with parameter estimation than the- numpy.linalg.svd()-based- numpy.linalg.matrix_rank().
- Changed the default least squares used to - scipy.linalg.lstsq()so that the- lapack_drivercan be changed to use QR factorization.
Version 4.20¶
- Correct calculation of first-stage F-statistic in IV models. 
Version 4.19¶
- Minor release to fix a wheel-building issue on Python 3.9 
Version 4.18¶
- Improved performance of - fit()by deferring some operations.
- Added support for the method available in PyHDFE in - AbsorbingLS. These methods can only be used when the variables absorbed are categorical (i.e., fixed-effects only) and when the model is unweighted.
- Added alternative measures of \(R^2\) using the squared correlation. See - corr_squared_overall(),- corr_squared_within(), and- corr_squared_between()(GH157).
- Added a clustered covariance estimator ( - linearmodels.system.covariance.ClusteredCovariance) for system regressions (GH241).
- Fixed a bug in - kernel_optimal_bandwidthwhich used incorrect values for a tuning parameter in the bandwidth estimation for the Parzen and Quadratic Spectral kernels (GH242).
Version 4.17¶
Version 4.16¶
- Added typing to all public-facing classes and methods (GH228, GH229). 
- Added - FamaMacBethResultswhich has the property- all_params()that contains a (nobs, nparam) DataFrame of parameters estimated in each time period (GH230).
Version 4.15¶
- Blackened the code. 
- Added McElroy’s and Berndt’s measures of system fit (GH215). 
- Removed support for Python 3.5 inline with NEP-29 (GH222). 
Version 4.14¶
- Fixed issue where datasets were not installed with wheels (GH217). 
- Switched to property-cached to inherit cached property from property (GH211). 
- Removed all use of - pandas.Panel(GH211).
Version 4.13¶
- Added - AbsorbingLSwhich allows a large number of variables to be absorbed. This model can handle very high-dimensional dummy variables and has been tested using up to 1,000,000 categories in a data set with 5,000,000 observations.
- Fixed a bug when estimating weighted panel models that have repeated observations (i.e., more than one observation per entity and time id). 
- Added - drop_absorbedoption to- PanelOLSwhich automatically drops variables that are absorbed by fixed effects. (GH206)
- Added optional Cythonized node selection for dropping singletons 
- Added preconditioning to the dummy variable matrix when - use_lsmr-Truein- fit(). In models with many effects, this can reduce run time by a factor of 4 or more.
Version 4.12¶
- Added an option to drop singleton observations in - PanelOLSby setting the keyword argument- singletons-False. When- False, singelton observations are dropped before the model is fit, so the the result is as-if the observations were never in- exogor- dependent.
- Added a method to construct the 2-core graph for 2-way effects models, which allows singleton observations with no effect on estimated slopes to be excluded. (GH191) 
- Added support for LSMR estimation of parameters in - fit()through the keyword argument- use_lsmr. LSMR is a sparse estimation method that can be used to extend- PanelOLSto more than two effects.
- Fixed a bug where IV models estimated with only exogenous regressors where not being correctly labeled as OLS models in output. (GH185) 
- Added - wald_testto panel-model results.
- Renamed - test_linear_constraintto- wald_test
- Added a low-memory option to - fit()that avoids constructing dummy variables. Only used when both- entity_effectsand- time_effectsare- True. By default, the low memory algorithm will be used whenever constructing the dummy variable array would require more than 1 GiB. (GH182)
- Added an option in model comparison ( - compare()and- compare()) to report standard errors or pvalues instead of t-stats. (GH178)
Version 4.11¶
- Fixed a bug which did not correctly check the rank of the cross-section regression in - FamaMacBeth(GH176)
- Fixed a bug which failed to correctly check rank conditions when specifying asset pricing models (GH173) 
- Switched to external package cached-property to manage caching instead of custom and less-well-tested solution (GH172) 
Version 4.10¶
- Fixed a bug where weights were incorrectly calculated for HAC covariances when the weight function was - 'parzen'or- 'gallant'(GH170)
Version 4.9¶
- Changed the return type of Wooldridge’s over identification test when invalid to - InvalidTestStatistic
- Add typing information to IV models 
- Allow optimization parameters to be passed to - IVGMMCUE
- Removed internal use of pandas Panel 
- Improved performance in panel models when using - from_formula()
- Switched to retaining index column names when original input index is named 
- Modified tests that were not well conceived 
- Added spell check to documentation build 
- Improve docstring for - summaryproperties
Version 4.8¶
- Corrected bug that prevented single character names in IV formulas 
- Corrected kappa estimation in LIML when there are no exogenous regressors 
Version 4.7¶
- Improved performance of Panel estimators by optimizing data structure construction 
Version 4.6¶
- Added a license 
Version 4.5¶
- Added System GMM estimator 
- Added automatic bandwidth for kernel-based GMM weighting estimators 
- Cleaned up HAC estimation across models 
- Added - predictmethod to IV, Panel and System model to allow out-of-sample prediction and simplify retrieval of in-sample results
- Fixed small issues with Fama-MacBeth which previously ignored weights 
Version 4.0¶
- Added Seemingly Unrelated Regression (SUR) Estimator 
- Added Three-stage Least Squares (3SLS) Estimator