STARResult.is_effectively_abrupt#
- property STARResult.is_effectively_abrupt: bool[source]#
Whether the fitted transition is so fast it is a hard threshold.
A large
gammadrives the logistic weight to an indicator, at which point the smooth model is aSETARwith two extra parameters and a flat likelihood ingamma. Reported so the flatness is visible rather than mistaken for a converged estimate.Example
A hard switch fitted as a smooth one lands at an enormous
gammaand the same threshold asSETAR:>>> import numpy as np >>> from cultivars.univariate.threshold import SETAR >>> rng = np.random.default_rng(2) >>> y = np.zeros(800) >>> for t in range(1, 800): ... mean = 0.5 + 0.7 * y[t - 1] if y[t - 1] <= 0 else -0.5 - 0.6 * y[t - 1] ... y[t] = mean + 0.3 * rng.standard_normal() >>> smooth, hard = LSTAR(y, order=1).fit(), SETAR(y, order=1).fit() >>> smooth.is_effectively_abrupt, bool(abs(smooth.threshold - hard.threshold) < 0.05) (True, True)