gen_dfm {bvartools}R Documentation

Dynamic Factor Model Input

Description

gen_dfm produces the input for the estimation of a dynamic factor model (DFM).

Usage

gen_dfm(x, p = 2, n = 1, iterations = 50000, burnin = 5000)

Arguments

x

a time-series object of stationary endogenous variables.

p

an integer vector of the lag order of the measurement equation. See 'Details'.

n

an integer vector of the number of factors. See 'Details'.

iterations

an integer of MCMC draws excluding burn-in draws (defaults to 50000).

burnin

an integer of MCMC draws used to initialize the sampler (defaults to 5000). These draws do not enter the computation of posterior moments, forecasts etc.

Details

The function produces the variable matrices of dynamic factor models (DFM) with measurement equation

x_t = \lambda f_t + u_t,

where x_t is an M \times 1 vector of observed variables, f_t is an N \times 1 vector of unobserved factors and \lambda is the corresponding M \times N matrix of factor loadings. u_t is an M \times 1 error term.

The transition equation is

f_t = \sum_{i=1}^{p} A_i f_{t - i} + v_t,

where A_i is an N \times N coefficient matrix and v_t is an N \times 1 error term.

If integer vectors are provided as arguments p or n, the function will produce a distinct model for all possible combinations of those specifications.

Value

An object of class 'dfmodel', which contains the following elements:

data

A list of data objects, which can be used for posterior simulation. Element X is a time-series object of normalised observable variables, i.e. each column has zero mean and unity variance.

model

A list of model specifications.

References

Chan, J., Koop, G., Poirier, D. J., & Tobias, J. L. (2019). Bayesian Econometric Methods (2nd ed.). Cambridge: University Press.

Lütkepohl, H. (2007). New introduction to multiple time series analysis (2nd ed.). Berlin: Springer.

Examples


# Load data
data("bem_dfmdata")

# Generate model data
model <- gen_dfm(x = bem_dfmdata, p = 1, n = 1,
                 iterations = 5000, burnin = 1000)


[Package bvartools version 0.2.4 Index]