STARResult._from_fit#

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

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

The transition variable is re-lagged from the series so that the stored copy is aligned with the effective sample, and its standard deviation is recomputed from that copy, which is the scale the estimator standardized by.

Parameters:
  • fit (_SmoothTransitionFit) – The raw estimator output.

  • model (_SmoothTransitionModel[STARResult]) – The specification, read for the series, the order and the transition family.

Return type:

STARResult

Returns:

The assembled result.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> model = LSTAR(rng.standard_normal(300), order=2, delay=2)
>>> res = STARResult._from_fit(model._fit_family(), model)
>>> res.order, res.delay, res.nobs, res.threshold_values.shape
(2, 2, 298, (298,))