TARNNResult._series#

TARNNResult._series()[source]#

Aligned per-observation output, widened by the regime split.

Uses the two-argument super deliberately. @dataclass(slots=True) builds a new class object and rebinds the name to it, so the __class__ cell that zero-argument super() closes over still points at the original, pre-slots class – which no subclass inherits from.

Return type:

dict[str, NDArray[double]]

Returns:

The observed/fitted/residual triple plus the threshold variable and the regime indicator.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> list(TARNN(rng.standard_normal(300), order=1).fit()._series())
['observed', 'fitted', 'resid', 'threshold_variable', 'regime_weight']