FAVAR._components#

static FAVAR._components(standardized, count)[source]#

Principal-component scores and variance shares of a panel.

Parameters:
  • standardized (NDArray[double]) – The (nobs, k) panel with zero column means and unit column variances.

  • count (int) – Number of components, at most min(nobs, k).

Return type:

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

Returns:

(scores, shares) – the (nobs, count) scores and the (count,) variance shares; the loadings are discarded because the observation equation refits them on the augmented block.

Example

>>> import numpy as np
>>> z = np.random.default_rng(0).standard_normal((100, 5))
>>> z = (z - z.mean(axis=0)) / z.std(axis=0)
>>> scores, shares = FAVAR._components(z, 2)
>>> scores.shape, shares.shape, bool(shares[0] >= shares[1])
((100, 2), (2,), True)