Param Estimator
BreakvarHeteroskedasticityTest
Variance break test for heteroskedasticity.
Uses statsmodels.tsa.stattools.breakvar_heteroskedasticity_test to test whether the sum-of-squares in the first subset of the sample is significantly different than the sum-of-squares in the last subset of the sample.
The null hypothesis is of no heteroskedasticity.
In literature, this test is typically applied to residuals of a fitted model, but can be applied to any time series.
It can also be used as a weak test for non-stationarity, as hetoroskedasticity implies non-stationarity, but not vice versa.
Quickstart
python
from sktime.param_est.stationarity import BreakvarHeteroskedasticityTest
estimator = BreakvarHeteroskedasticityTest(p_threshold=0.05, subset_length=0.3333333333333333, alternative='two-sided', use_f=True)Parameters(4)
- p_thresholdfloat, optional, default=0.05
- significance threshold to apply in testing for heteroskedasticity.
- subset_lengthfloat, default=1/3
- Length of the subsets to test.
- alternativestr, ‘increasing’, ‘decreasing’ or ‘two-sided’, default=’two-sided’
- This specifies the alternative for the p-value calculation.
- use_fbool, optional
- Whether or not to compare against the asymptotic distribution (chi-squared) or the approximate small-sample distribution (F). Default is True (i.e. default is to compare against an F distribution).
Examples
>>> from sktime.datasets import load_airline
>>> from sktime.param_est.stationarity import BreakvarHeteroskedasticityTest
>>>
>>> X = load_airline ()
>>> sty_est = BreakvarHeteroskedasticityTest ()
>>> sty_est. fit (X) BreakvarHeteroskedasticityTest(
... )