VARResult._from_fit#

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

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

Parameters:
  • fit (_VectorAutoRegressionFit) – The arrays _fit_family produced, including the posterior inference when the model carried a prior.

  • model (_VectorAutoRegressionModel[Self]) – The model that produced it, read for the sample and the specification.

Return type:

Self

Returns:

A populated result.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> model = VAR(rng.standard_normal((120, 2)), order=1)
>>> built = VARResult._from_fit(model._fit_family(), model)
>>> bool(np.allclose(built.coefficients, model.fit().coefficients))
True