VECMXResult.weak_exogeneity#

VECMXResult.weak_exogeneity(variable)[source]#

Test that a variable does not adjust to any disequilibrium.

The null is that the variable’s row of alpha is zero, so it drives the long-run relations without responding to them and can be treated as weakly exogenous for beta:

\[H_0 : \alpha_{j\cdot} = 0, \qquad W \sim \chi^2(r).\]
Parameters:

variable (str) – One of names.

Return type:

_WaldTest

Returns:

A _WaldTest with rank degrees of freedom.

Raises:

SpecificationError – If the variable is unknown, or the rank is zero and there is no adjustment to test.

Example

The common trend is the first series, so it does not adjust and the second does:

>>> 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()
>>> first, second = res.weak_exogeneity("y1"), res.weak_exogeneity("y2")
>>> first.df, bool(first.pvalue > 0.1), bool(second.pvalue < 0.001)
(1, True, True)
>>> first.null
'y1 is weakly exogenous for the cointegrating space'
>>> VECM(y, order=2, rank=0).fit().weak_exogeneity("y1")
Traceback (most recent call last):
cultivars.exceptions.SpecificationError: a rank-zero model has no cointegrating ...