pyqlrtest is a Python package for performing Quandt-Likelihood Ratio (QLR) tests, also known as sup-F tests, to detect structural breaks in time series regression models. This test is crucial for identifying points in time where the parameters of a model may have changed.
The implementation calculates F-statistics across a trimmed range of potential breakpoints and uses Hansen's (1997, 2000) approximations for asymptotic p-values.
- Calculation of QLR (sup-F) statistic.
- Estimation of the most likely breakpoint.
- Asymptotic p-value calculation using Hansen's (1997, 2000) method.
- Approximated critical values based on Andrews (2003) for 15% trimming.
- Supports
numpyarrays andpandasSeries/DataFrames as input. - Flexible trimming parameter.
You can install pyqlrtest using pip (once it's published to PyPI):
pip install pyqlrtest