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.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
card.svg |card.png
dfms/json (API)
NEWS

# 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.08 score 1 stars 24 scripts 569 downloads 12 exports 3 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE171
linux-devel-x86_64NOTE170
source / vignettesOK235
linux-release-arm64NOTE183
linux-release-x86_64NOTE158
wasm-releaseOK137

Exports:.VARainvapinvconvertDFMem_convergedFISICrnewsSKFSKFStsnarmimp

Dependencies:collapseRcppRcppArmadillo

Dynamic Factor Models: A Very Short Introduction

Rendered fromdynamic_factor_models.Rnwusingutils::Sweaveon Jun 18 2026.

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

Introduction to dfms

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Jun 18 2026.

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

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