Dynamic Factor Models
Overview
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.
- New function
convert()to exportdfmobjects todlmorKFASstate-space formats, enabling their forecasting, smoothing, and prediction-interval functionality. Thanks @kletts (#106). - Fixed
convert(..., to = "KFAS")for multivariate models.
From NEWS.md in the release
Install
Health
NOTEdependencies in R coder-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Namespace in Imports field not imported from: ‘Rcpp’ All declared Imports should be used.
- NOTE11 OK, 2 NOTENow
- NOTE10 OK, 4 NOTE2026-04-22
- ERROR9 OK, 4 NOTE, 1 ERROR2026-04-18
- NOTE10 OK, 4 NOTE2026-03-10
Documentation
- Help pages
- 18includes a package overview page
- Examples that run
- 53%9 run in a plain check · 5 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run · 2 hold no code
- Exported functions with examples
- 100%
- Documented parameters
- 92%
- Return-value docs
- 100%
- Help pages citing references
- 39%
Downloads
Repository
- PRs merged (all time)
- 99%
- Median days to close, 50 most recently updated closed issues
- 31
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
10 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/ropensci/dfms on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-01-22
pkgdown site last built 2026-01-22, before release 1.0.1 (2026-06-18)
Show all practicesHide 3 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-01-22Named in .Rbuildignore: .claudePull request it wrote: opened by a project member
- Cursorfirst seen 2026-01-22Named in .Rbuildignore: .cursorCommits: at least 1 crediting it in the message
Dependencies
Installing dfms adds 3 packages (3 with compiled code, 4.2 MB of source tarballs). Heaviest: Rcpp 1.8 MB, collapse 1.4 MB, RcppArmadillo 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.0.1Latest
- RR 4.6.0 released · 2026-04-24
- 1.0.0
- 0.4.02026-01-18 · diff ↗
- 0.3.22025-09-24 · diff ↗
- 0.3.12025-08-20 · diff ↗
- 0.3.02025-05-18 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.2.22024-06-09 · diff ↗
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.2.12023-04-03 · diff ↗
- 0.2.02023-03-31 · diff ↗
- 0.1.42023-01-12 · diff ↗
- 0.1.32022-10-12
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-10-12
- Total releases
- 11 / 4 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 115 KB / 3 files
- Download size
- 616 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("dfms")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.