BGM {FAVAR} | R Documentation |
Separate R
From X
Description
X
may include some information related with R
. The function
extract factors from X
which is not related with R
by iteration
based on Boivin et al. (2009).
Usage
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. |
Details
The algorithm is as follows:
Extract the first K principal components noted
F_t^{(0)}
fromX
.Regress
X
onF_t^{(0)}
andR_t
, and get regression coefficients\beta_R^{(0)}
ofR_t
.compute
X_0^{(0)} = X_t- R_t \beta_R
.Extract the first K principal components noted
F_t^{(1)}
fromX_t^{(0)}
.repeat step 2 - step 4 until precision you want.
Value
the first K principle components, i.e. F_t^{(n)}
, not containing the information R
.
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.
Examples
data('regdata')
BGM(X = regdata[,1:115],R = regdata[,ncol(regdata)], K = 2)