VARXResult.equation#

VARXResult.equation(name)[source]#

The coefficients of one equation, keyed by regressor.

Parameters:

name (str) – An endogenous variable.

Return type:

dict[str, float]

Returns:

Deterministic terms, then endogenous lags, then the distributed lag, in the order they enter the design.

Raises:

SpecificationError – If the variable is unknown.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y, x = rng.standard_normal((120, 2)), rng.standard_normal((120, 1))
>>> res = VARX(y, x, order=1, exog_order=1, names=("a", "b"), exog_names=("z",)).fit()
>>> list(res.equation("b"))
['const', 'a.L1', 'b.L1', 'z', 'z.L1']
>>> res.equation("z")
Traceback (most recent call last):
cultivars.exceptions.SpecificationError: unknown variable 'z'; expected one of ...