Estimates a Dynamic Factor Model by extracting factors via PLS and modeling their dynamics with a Vector Autoregression. Includes automatic lag selection, robust inference, and optional out-of-sample evaluation.
estimate_DFM(
factors_data,
p = 2,
compute_oos = TRUE,
hc_type = "HC3",
verbose = TRUE
)List with components:
var_fitFitted VAR model on combined factors.
p_usedVAR lag order used.
robust_seMatrices of robust standard errors.
diagnosticsList of diagnostic tests (stability, serial correlation).
oos_metricsOut-of-sample forecast evaluation (if requested).
List containing PLS-extracted factor scores (scores_X,
scores_Y) and related objects.
Integer. VAR lag order. If NULL, selected automatically. Default is 2.
Logical. Should out-of-sample diagnostics be computed? Default is TRUE.
Character string. Heteroskedasticity-consistent SE type. Default is "HC3".
Logical; print progress and diagnostic information. Default TRUE.
This function models the joint dynamics of X and Y factors using a VAR. It performs stability checks, tests for serial correlation, computes robust standard errors, and optionally evaluates forecast performance out-of-sample.