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

Version: 1.0.0
Depends: R (≥ 4.1.0)
Imports: Rcpp (≥ 1.0.1), collapse (≥ 2.0.0)
LinkingTo: Rcpp, RcppArmadillo
Suggests: xts, vars, magrittr, testthat (≥ 3.0.0), knitr, rmarkdown, covr
Published: 2026-01-26
DOI: 10.32614/CRAN.package.dfms
Author: Sebastian Krantz [aut, cre], Rytis Bagdziunas [aut], Santtu Tikka [rev], Eli Holmes [rev]
Maintainer: Sebastian Krantz <sebastian.krantz at graduateinstitute.ch>
BugReports: https://github.com/ropensci/dfms/issues
License: GPL-3
URL: https://docs.ropensci.org/dfms/, https://github.com/ropensci/dfms
NeedsCompilation: yes
Materials: README, NEWS
In views: TimeSeries
CRAN checks: dfms results

Documentation:

Reference manual: dfms.html , dfms.pdf
Vignettes: Introduction to dfms (source, R code)
Dynamic Factor Models: A Very Short Introduction (source)

Downloads:

Package source: dfms_1.0.0.tar.gz
Windows binaries: r-devel: dfms_0.4.0.zip, r-release: dfms_0.4.0.zip, r-oldrel: dfms_0.4.0.zip
macOS binaries: r-release (arm64): dfms_1.0.0.tgz, r-oldrel (arm64): dfms_1.0.0.tgz, r-release (x86_64): dfms_1.0.0.tgz, r-oldrel (x86_64): dfms_1.0.0.tgz
Old sources: dfms archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=dfms to link to this page.