Package: dfms 1.0.0

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]

dfms_1.0.0.tar.gz
dfms_1.0.0.zip(r-4.6)dfms_1.0.0.zip(r-4.5)dfms_1.0.0.zip(r-4.4)
dfms_1.0.0.tgz(r-4.6-x86_64)dfms_1.0.0.tgz(r-4.6-arm64)dfms_1.0.0.tgz(r-4.5-x86_64)dfms_1.0.0.tgz(r-4.5-arm64)
dfms_1.0.0.tar.gz(r-4.6-arm64)dfms_1.0.0.tar.gz(r-4.6-x86_64)dfms_1.0.0.tar.gz(r-4.5-arm64)dfms_1.0.0.tar.gz(r-4.5-x86_64)
dfms_1.0.0.tgz(r-4.5-emscripten)
dfms.pdf |dfms.html
dfms/json (API)
NEWS

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

Reviews:rOpenSci Software Review #556

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:

dynamic-factor-modelstime-seriesopenblascpp

6.57 score 41 stars 20 scripts 641 downloads 11 exports 3 dependencies

Last updated from:ba1af5a03d (on main). Checks:11 NOTE, 3 OK. Indexed: yes.

TargetResultTotal timeArtifact
linux-devel-arm64NOTE190
linux-devel-x86_64NOTE203
pkgdown docsOK306
source / vignettesOK308
linux-release-arm64NOTE154
linux-release-x86_64NOTE158
macos-devel-arm64NOTE170
macos-devel-x86_64NOTE230
macos-release-arm64NOTE177
macos-release-x86_64NOTE259
windows-develNOTE245
windows-releaseNOTE142
windows-oldrelNOTE192
wasm-releaseOK112

Exports:.VARainvapinvDFMem_convergedFISICrnewsSKFSKFStsnarmimp

Dependencies:collapseRcppRcppArmadillo

Introduction to dfms

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Jan 27 2026.

Last update: 2026-01-27
Started: 2022-09-21

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
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