BVARResult._regressor_labels#

BVARResult._regressor_labels()[source]#

Per-equation regressor labels, in design-row order.

The deterministic labels first – "const", then "trend" when trend is "ct" – followed by the lag blocks lag-major, "{name}.L1" for every name, then "{name}.L2", and so on. The tuple has length w and indexes the rows of beta_mean and of each draw in beta_draws, so labels.index(label) is the row a user-facing label refers to. It is the lookup table credible_interval() validates against and the table _summary_table() reads the own-first-lag row from.

Return type:

tuple[str, ...]

Returns:

Labels of length n_det + k * p, in design-row order.

Example

>>> import numpy as np
>>> from cultivars.multivariate.large_dim.bayesian import BVAR
>>> y = np.random.default_rng(0).standard_normal((60, 2))
>>> res = BVAR(y, order=2, trend="ct", names=("a", "b")).fit(n_draws=10, seed=0)
>>> res._regressor_labels()
('const', 'trend', 'a.L1', 'b.L1', 'a.L2', 'b.L2')
>>> len(res._regressor_labels()) == res.beta_mean.shape[0]
True