GVAR.variable_of_column#
- property GVAR.variable_of_column: tuple[int, ...][source]#
Variable identity for each global column, as integer codes.
Codes are assigned in order of first appearance of each label, so the first unit’s variables are
0, 1, ...and a later unit’s column that repeats a label reuses its code.Example
>>> import numpy as np >>> from cultivars.multivariate.reduced_form.vector_autoregression import VARX >>> y = np.random.default_rng(0).standard_normal((200, 3)) >>> wide = VARX(y[:, :2], y[:, 2:], order=1).fit() >>> narrow = VARX(y[:, 2:], y[:, :1], order=1).fit() >>> swap = np.array([[0.0, 1.0], [1.0, 0.0]]) >>> GVAR([wide, narrow], swap, variable_labels=["gdp", "inf", "gdp"]).variable_of_column (0, 1, 0)