BGM function

Separate RR From XX

Separate RR From XX

XX may include some information related with RR. The function extract factors from X which is not related with R by iteration based on Boivin et al. (2009).

BGM(X, R, K = 2, tolerance = 0.001, nmax = 100)

Arguments

  • X: a large matrix from which principle components are extracted.
  • R: a numeric vector which we are interesting in, for example interest rates.
  • K: the number of extracted principle components.
  • tolerance: the difference between factors when iterating.
  • nmax: the max iterations, see details.

Returns

the first K principle components, i.e. Ft(n)F_t^{(n)}, not containing the information R.

Details

The algorithm is as follows:

  1. Extract the first K principal components noted Ft(0)F_t^{(0)} from X.
  2. Regress X on Ft(0)F_t^{(0)} and RtR_t, and get regression coefficients βR(0)\beta_R^{(0)} of RtR_t.
  3. compute X0(0)=XtRtβRX_0^{(0)} = X_t- R_t \beta_R.
  4. Extract the first K principal components noted Ft(1)F_t^{(1)} from X_t^{(0)}.
  5. repeat step 2 - step 4 until precision you want.

Examples

data('regdata') BGM(X = regdata[,1:115],R = regdata[,ncol(regdata)], K = 2)

References

Boivin, J., M.P. Giannoni and I. Mihov, Sticky Prices and Monetary Policy: Evidence from Disaggregated US Data. American Economic Review, 2009. 99(1): p. 350-384.

  • Maintainer: Pu Chen
  • License: GPL-3
  • Last published: 2022-05-26

Useful links