VARXResult._from_fit#

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

Assemble the public result from the internal fit and its model.

Parameters:
  • fit (_ExogenousVectorAutoRegressionFit) – The arrays _fit_family produced, with the distributed-lag stack split off the trailing design block.

  • model (_ExogenousVectorAutoRegressionModel) – The model that produced it, read for both samples and the specification.

Return type:

Self

Returns:

A populated result.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y, x = rng.standard_normal((120, 2)), rng.standard_normal((120, 1))
>>> model = VARX(y, x, order=1)
>>> built = VARXResult._from_fit(model._fit_family(), model)
>>> bool(np.allclose(built.exog_coefficients, model.fit().exog_coefficients))
True