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
where
is an
vector of observed variables,
is an
vector of unobserved factors and
is the corresponding
matrix of factor loadings.
is an
error term.
The transition equation is
where
is an
coefficient matrix and
is an
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
|
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)