VECMXResult.normalized_beta#

VECMXResult.normalized_beta(*, on=0)[source]#

Cointegrating vectors scaled so one variable’s loading is one in each.

The eigenvectors come out of the decomposition normalized to make beta' S11 beta the identity, which is convenient for the algebra and unreadable as economics. Without further restrictions only the cointegrating space is identified, so any basis for it is as valid as any other; this picks the basis someone would write on a blackboard.

Parameters:

on (int) – Index of the variable whose coefficient is set to one.

Return type:

NDArray[double]

Returns:

A (k or k + 1, r) array, empty when the rank is zero.

Raises:

SpecificationError – If the index is out of range, or its loading is numerically zero in some vector, which means the normalization would divide by nothing and another variable should carry it.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> common = np.cumsum(rng.standard_normal(300))
>>> y = np.column_stack([common, 2 * common + rng.standard_normal(300)])
>>> res = VECM(y, order=2, rank=1).fit()
>>> res.normalized_beta().ravel().round(2)
array([ 1.  , -0.49])
>>> res.normalized_beta(on=1).ravel().round(2)
array([-2.02,  1.  ])
>>> res.normalized_beta(on=2)
Traceback (most recent call last):
cultivars.exceptions.SpecificationError: on must index a variable, 0..1; got 2.