FAVARResult#
- class cultivars.multivariate.large_dim.factor_augmented.FAVARResult(*, panel, observed, factors, loadings, scores, panel_names, explained_variance, r2, cleaned, _scales)[source]#
A fitted factor-augmented vector autoregression.
The estimates of
\[\begin{split}\begin{pmatrix} F_t \\ Y_t \end{pmatrix} = \sum_{i=1}^{p} A_i \begin{pmatrix} F_{t-i} \\ Y_{t-i} \end{pmatrix} + u_t, \qquad x_t = \Lambda^F F_t + \Lambda^Y Y_t + e_t,\end{split}\]where \(F_t\) are the principal-component factors of the standardized panel \(x_t\) (cleaned of \(Y_t\)’s contemporaneous influence when slow series were declared), \(Y_t\) is the observed block, and the observation equation is fitted by least squares one panel series at a time. Composition, stated plainly:
factorsis a completeVARResulton the augmented block, and every factor-level question – coefficients, diagnostics, stability, reduced-form impulse responses – is answered there. It is also a closed system, so every identification model incultivars.multivariate.structuralaccepts it directly, andFactorAugmentedSVARmaps an identified factor-space shock onto responses of every series throughloadings. This object owns what the factor result cannot know: the panel, the loadings and the standardization that was undone.Note
explained_varianceis the principal components’ share before cleaning, since cleaning moves the factors off the component basis.r2andcommon_componentare unaffected by cleaning: the cleaned factors span, together with the observed block, the same column space as the raw ones, so the observation equation fits identically. The factor labelsf1 ... frare a basis, not names – principal components are identified up to rotation, andloadingsrotate with them, so panel responses to an identified shock do not depend on the basis while a factor-by-factor reading does.- Variables:
panel – The informational panel as supplied.
observed – The observed block as supplied.
factors – The fitted VAR on
[F, Y], carrying the whole reduced-form surface and accepting every identification model.loadings –
(n_series, r + m)observation-equation coefficients of the standardized panel on the augmented block.scores – The
(nobs, r)estimated factors, cleaned whenslowwas declared.panel_names – One label per panel series.
explained_variance – Share of standardized panel variance each factor carries, before cleaning.
r2 – Per-series fit of the observation equation, the common-component share of each series.
cleaned – Whether the Bernanke-Boivin-Eliasz slow-variable cleaning ran.
See also
FAVAR– the model that produces this record.FactorAugmentedSVAR– identification onfactorsmapped onto the panel.DFMResult– the factor model without an observed block.
References
Bernanke, B. S., Boivin, J., & Eliasz, P. (2005). Measuring the effects of monetary policy: A factor-augmented vector autoregressive (FAVAR) approach. Quarterly Journal of Economics, 120(1), 387-422.
Example
One factor, thirty series, a policy rate that loads on the factor; the augmented VAR has two variables and the observation equation explains most of the panel:
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> factor = np.zeros(300) >>> for t in range(1, 300): ... factor[t] = 0.7 * factor[t - 1] + rng.standard_normal() >>> panel = np.outer(factor, rng.uniform(0.5, 1.5, 30)) >>> panel += 0.3 * rng.standard_normal((300, 30)) >>> policy = 0.4 * factor + rng.standard_normal(300) >>> res = FAVAR(panel, policy[:, None], n_factors=1, order=1).fit() >>> res.n_series, res.n_factors, res.factors.names, res.cleaned (30, 1, ('f1', 'y1'), False) >>> res.loadings.shape, res.scores.shape, res.explained_variance.shape ((30, 2), (300, 1), (1,)) >>> bool(res.r2.mean() > 0.9), bool(abs(np.corrcoef(res.scores[:, 0], factor)[0, 1]) > 0.95) (True, True)
Attributes#
The informational panel as supplied, |
|
The observed block as supplied, |
|
The fitted VAR on |
|
|
|
|
|
One label per panel series, in column order. |
|
|
|
|
|
Whether the Bernanke-Boivin-Eliasz slow-variable cleaning ran. |
|
Number of estimated factors. |
|
Number of panel series. |
Methods#
The panel as the factors and observed block see it, in original units. |
|
|
The estimation summary, renderable as text, HTML, or a dataframe. |