Changelog
0.10.0 - 2025-03-19
New features:
Implemented the weak-instrument robust residual prediction test of Scheidegger et al. (2026) and the confidence sets obtained by inversion.
Other changes:
The
residual_prediction_test()now uses clipping viagammaof weights as described in the paper.
0.9.0 - 2025-09-04
New features:
Implemented the more powerful critical values of Londschien (2025) for the
conditional_likelihood_ratio_test()
0.8.0 - 2025-08-16
New features:
The functions
proj()andoproj()now accept pandas DataFrames and Series as arguments.The
conditional_likelihood_ratio_test()now supports testing hypotheses for included exogenous covariates.The more powerful critical values of Guggenberger et al. (2019) (
"gkm") are now supported when testing hypotheses for included exogenous covariates.
Other changes:
The
named_coefs_attribute of theKClassis now renamed tonamed_coef_. Accessingnamed_coefs_will raise aDeprecationWarning.Quadric’s ‘__format__()now prints the same asConfidenceSet’s__format__()if the quadric is one-dimensional.Made
_characteristic_roots()more robust when using singularb._find_roots()now usesscipy.optimize.brentq.
0.7.0 - 2025-06-03
New features:
The
inverse_anderson_rubin_test()now supports the GKM critical values by passingcritical_values="gkm". These can be used by supplyingtest="anderson-rubin (gkm)"toSummaryorsummary().
Bug fixes:
Make
_characteristic_rootsmore robust ifBis singular.
0.6.0 - 2025-05-22
New features:
Added the
residual_prediction_test()for model misspecification.
0.5.3 - 2025-04-21
Bug fixes:
The classes
KClassandAnchorRegressionnow set attributesn_features_in_andfeature_names_in_to comply with sckit-learn SLEP 7 and 10.
0.5.2 - 2024-10-03
Bug fixes:
The
Summarynow correctly includes the rank and J test results.
0.5.1 - 2024-09-16
Bug fixes:
Fixed the
setuptoolsconfiguration.
0.5.0 - 2024-08-27
New features:
The Wald test now supports robust covariance estimation.
New method
lengthforConfidenceSet.
Other changes:
One can now pass the tolerance parameter
tolto the optimization algorithm inlagrange_multiplier_test()andinverse_lagrange_multiplier_test()via thekwargs.KClassnow raises ifkappa >= 1(as for the LIML and TSLS estimators) and the number of instruments is less than the number of endogenous regressors.The
Summarynow only includes and prints the results of the J-statistic and (multivariate) F-test for instrument strength if this makes sense.The docs have been updated and include examples.
0.4.0 - 2024-08-08
New features:
New test
j_test()of the overidentifying restrictions.The tests
inverse_lagrange_multiplier_test()andinverse_conditional_likelihood_ratio_test()now possibly return unions of intervals, instead of one conservative large interval.
Bug fixes:
Fixed bug in
fit()whenCis notNoneand \(M_{[Z, C]} X\) is not full rank.Fixed bug in
inverse_conditional_likelihood_ratio_test()whenk == mw + mxandCis notNone.Fixed bug in
_characteristic_roots()ifb == np.array([[0]]). This now correctly returnsnp.inf.
Other changes:
The
Summarynow additionally reports the LIML variant of the J-statistic.
0.3.1 - 2024-07-30
Bug fixes:
Fixed bug in
inverse_conditional_likelihood_ratio_test.
0.3.0 - 2024-07-23
New features:
New functions
inverse_lagrange_multiplier_test()andinverse_conditional_likelihood_ratio_test()to approximate the 1 dimensional confidence sets by inverting the corresponding (subvector) tests.New class
ConfidenceSet.New class
Summaryholding information about the model fit.New class
CoefficientTableholding a table of coefficients and their p-values.New method
summary()to create a summary of the model fit.The
KClassgets new attributes after fitting a model:endogenous_names_,exogenous_names_, andinstrument_names_. If pandas is installed, there’s alsonames_coefs_.The tests
anderson_rubin_test(),lagrange_multiplier_test(),likelihood_ratio_test(), andwald_test()and their inversesinverse_anderson_rubin_test(),inverse_lagrange_multiplier_test(),inverse_likelihood_ratio_test(), andinverse_wald_test()now support an additional parameterDof exogenous covariates to be included in the test. This is not supported for the conditional likelihood ratio test.
Other changes:
The function
lagrange_multiplier_test()is now slightly faster.KClassnow acceptspandas.Seriesas arguments toy.
0.2.0 - 2024-06-07
New features:
New method
simulate_guggenberger12()to draw from the data generating process of Guggenberger (2012).The utility functions
proj()andoproj()now accept multiple args to be projected. Usage of this results in performance improvements.
Other changes:
The utility functions
proj()andoproj()now use thescipy.linalg(..., lapack_driver="gelsy"). This results in a speedup.The numerical integration function
conditional_likelihood_ratio_critical_value_function()has been reparametrized, yielding a speedup.