GibbsBVARResult._lag_diagnostic#
- GibbsBVARResult._lag_diagnostic()[source]#
The lag-block rows of
shrinkageas a(p, k, k)stack.Skips the deterministic rows and transposes each lag block so that entry
[lag, i, j]refers to equationiand regressorj, matchingcoefficients.Example
>>> import numpy as np >>> from cultivars.bayes.priors import HorseshoePrior >>> y = np.random.default_rng(0).standard_normal((150, 2)) >>> res = GibbsBVAR(y, order=2, prior=HorseshoePrior()).fit( ... n_draws=60, n_burn=20, seed=0 ... ) >>> res.shrinkage.shape, res._lag_diagnostic().shape ((5, 2), (2, 2, 2)) >>> bool(np.allclose(res._lag_diagnostic()[0], res.shrinkage[1:3].T)) True