TVARResult._from_fit#

classmethod TVARResult._from_fit(fit, model)[source]#

Assemble the public result from a raw fit and its specification.

Parameters:
  • fit (_VectorThresholdFit) – The packed grid-search fit.

  • model (_ThresholdVectorAutoRegressionModel[TVARResult]) – The validated specification it was estimated on.

Return type:

TVARResult

Returns:

The frozen TVARResult.

Example

>>> import numpy as np
>>> y = np.random.default_rng(0).standard_normal((200, 2))
>>> model = TVAR(y, order=2, transition_variable="y2")
>>> res = TVARResult._from_fit(model._fit_regimes(), model)
>>> res.searched_delay, res.delay in (1, 2), res.threshold_name
(True, True, 'y2')