Package: dfms 1.0.1

Sebastian Krantz

dfms: Dynamic Factor Models

Efficient estimation of Dynamic Factor Models using the Expectation Maximization (EM) algorithm or Two-Step (2S) estimation, supporting datasets with missing data and mixed-frequency nowcasting applications. Factors follow a stationary VAR process of order p. Estimation options include: running the Kalman Filter and Smoother once with PCA initial values (2S) as in Doz, Giannone and Reichlin (2011) <doi:10.1016/j.jeconom.2011.02.012>; iterated Kalman Filtering and Smoothing until EM convergence as in Doz, Giannone and Reichlin (2012) <doi:10.1162/REST_a_00225>; or the adapted EM algorithm of Banbura and Modugno (2014) <doi:10.1002/jae.2306>, allowing arbitrary missing-data patterns and monthly-quarterly mixed-frequency datasets. The implementation uses the 'Armadillo' 'C++' library and the 'collapse' package for fast estimation. A comprehensive set of methods supports interpretation and visualization, forecasting, and decomposition of the 'news' content of macroeconomic data releases following Banbura and Modugno (2014). Information criteria to choose the number of factors are also provided, following Bai and Ng (2002) <doi:10.1111/1468-0262.00273>.

Authors:Sebastian Krantz [aut, cre], Rytis Bagdziunas [aut], Santtu Tikka [rev], Eli Holmes [rev], Christian Klettner [ctb]

dfms_1.0.1.tar.gz
dfms_1.0.1.zip(r-4.7-x86_64)dfms_1.0.1.zip(r-4.7-arm64)dfms_1.0.1.zip(r-4.6-x86_64)dfms_1.0.1.zip(r-4.6-arm64)
dfms_1.0.1.tar.gz(r-4.7-arm64)dfms_1.0.1.tar.gz(r-4.7-x86_64)dfms_1.0.1.tar.gz(r-4.6-arm64)dfms_1.0.1.tar.gz(r-4.6-x86_64)
dfms_1.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
dfms/json (API)

# Install 'dfms' in R:
install.packages('dfms', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ropensci/dfms/issues

Pkgdown/docs site:https://docs.ropensci.org

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • BM14_M - Euro Area Macroeconomic Data from Banbura and Modugno 2014
  • BM14_Models - Euro Area Macroeconomic Data from Banbura and Modugno 2014
  • BM14_Q - Euro Area Macroeconomic Data from Banbura and Modugno 2014

On CRAN:

Conda:

openblascpp

4.09 score 1 stars 41 scripts 744 downloads 12 exports 3 dependencies

Last updated from:1eb3ef8e43. Checks:8 NOTE, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE129
linux-devel-x86_64NOTE152
source / vignettesOK258
linux-release-arm64NOTE129
linux-release-x86_64NOTE158
windows-devel-arm64NOTE234
windows-devel-x86_64NOTE144
windows-release-arm64NOTE265
windows-release-x86_64NOTE152
wasm-releaseOK126

Exports:.VARainvapinvconvertDFMem_convergedFISICrnewsSKFSKFStsnarmimp

Dependencies:collapseRcppRcppArmadillo

Introduction to dfms
Determining the Structure of the Model | Estimation and Exploration | Forecasting | Estimation with Mixed Frequency | Modeling AR(1) Idiosyncratic Errors | News Decomposition | Additional Functions | Conclusion | References

Last update: 2026-06-18
Started: 2022-10-12

Dynamic Factor Models: A Very Short Introduction

Last update: 2023-03-31
Started: 2023-03-31

Readme and manuals

Help Manual

Help pageTopics
Dynamic Factor Modelsdfms-package dfms
(Fast) Barebones Vector-Autoregression.VAR
Armadillo's Inverse Functionsainv apinv
Extract Factor Estimates in a Data Frameas.data.frame.dfm
Euro Area Macroeconomic Data from Banbura and Modugno 2014BM14_M BM14_Models BM14_Q
Convert DFM to Other State Space Model Formatsconvert convert.dfm
Estimate a Dynamic Factor ModelDFM
Convergence Test for EM-Algorithmem_converged
(Fast) Fixed-Interval Smoother (Kalman Smoother)FIS
Information Criteria to Determine the Number of Factors (r)ICr plot.ICr print.ICr screeplot.ICr
News Decomposition$.dfm_news_list as.data.frame.dfm_news_list news news.dfm print.dfm_news print.dfm_news_list [.dfm_news_list [[.dfm_news_list
Plot DFMplot.dfm screeplot.dfm
DFM Forecastsas.data.frame.dfm_forecast plot.dfm_forecast predict.dfm print.dfm_forecast
DFM Residuals and Fitted Valuesfitted.dfm resid.dfm residuals.dfm
(Fast) Stationary Kalman FilterSKF
(Fast) Stationary Kalman Filter and SmootherSKFS
DFM Summary Methodscoef.dfm logLik.dfm print.dfm print.dfm_summary summary.dfm
Remove and Impute Missing Values in a Multivariate Time Seriestsnarmimp