do_everything_fglr: Estimate IRFs and associated bootstrap intervals for S-DFM

View source: R/do_everything.R

do_everything_fglrR Documentation

Estimate IRFs and associated bootstrap intervals for S-DFM

Description

do_everything_fglr is a user-friendly wrapper estimating the recursively identified S-DFM model and associated bootstrap intervals for IRFs within one function. The function allows the user to specify the model similarly to DfmRawImp, to which the user is referred for examples.

Usage

do_everything_fglr(df, r, k, h, nrep = 500, ci = 0.8)

Arguments

df

list containing items:

  1. df, data in a T x n matrix;

  2. int_ix, an index vector coding the columns corresponding to the variables of interest in the data;

  3. trans_ix, an index vector giving the variable transformation codes as in McCracken and Ng (2016);

  4. shock_ix, specify the shock of interest and the normalization at impact, defaults to c(3,0.5)

r

static factor dimension

k

VAR degree on the static factors

h

h-step ahead IRFs

nrep

number of replications in the bootstrap

ci

confidence intervals for the IRFs

The estimated models are identified recursively using Cholesky decomposition of the residual covariance matrix. As a default, the function returns the impulse responses to the third shock, the size of which is normalized to 0.5 on impact. For changing the shock of interest (i.e. not the third), and the normalization constant, the user should include store a vector of length 2 as df$shock_ix with the position of the shock of interest as the first element and the normalization constant as the second element. For a more flexible setup, such as identifying more than one shock or obtaining responses to many variables, the user can use function DfmRawImp, which returns the non-structural IRF.

Value

Structural impulse response function as an array

See Also

McCracken, M. W., & Ng, S. (2016). FRED-MD: A monthly database for macroeconomic research. Journal of Business & Economic Statistics, 34(4), 574-589.


juhokalle/rmfd4dfm documentation built on July 18, 2024, 10:19 p.m.