Skip to content

A Python package for performing Quandt Likelihood Ratio (QLR) or Sup-F tests to identify structural breaks in linear regression models, using Hansen's (1997/2000) p-value approximations.

License

Notifications You must be signed in to change notification settings

JacobSKN/pyqlrtest

Repository files navigation

pyqlrtest

PyPI version License: MIT CI 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.

Features

  • 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 numpy arrays and pandas Series/DataFrames as input.
  • Flexible trimming parameter.

Installation

You can install pyqlrtest using pip (once it's published to PyPI):

pip install pyqlrtest

About

A Python package for performing Quandt Likelihood Ratio (QLR) or Sup-F tests to identify structural breaks in linear regression models, using Hansen's (1997/2000) p-value approximations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages