VARMA._unpack#

VARMA._unpack(moments)[source]#

Split a stage’s coefficients into deterministic, AR, and MA blocks.

Parameters:

moments (_VectorMoments) – The Gaussian moments of a stage regression whose design was laid out by _stage_regression().

Return type:

tuple[NDArray[double], NDArray[double], NDArray[double]]

Returns:

The (d, k) deterministic rows, the (p, k, k) autoregressive stack, and the (q, k, k) moving-average stack.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> y = rng.standard_normal((200, 2))
>>> model = VARMA(y, order=(2, 1))
>>> moments, _ = model._stage_regression(rng.standard_normal((200, 2)), 5)
>>> [block.shape for block in model._unpack(moments)]
[(1, 2), (2, 2, 2), (1, 2, 2)]