dfms
1.0.1Dynamic 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.
Install
Health
- NOTE r-devel-linux-x86_64-fedora-clang
- NOTE r-devel-linux-x86_64-fedora-gcc
- NOTE2026-04-2210 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-04-189 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- NOTE2026-03-1010 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 65%
- Documented parameters
- 92%
- Return-value docs
- 100%
- References docs
- 39%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
5 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/ropensci/dfms on 2026-07-19.
Show all practices
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 2.0 median / 80 max
- Test cases
- 59 / 0.17 per code line
Test coverage
Line coverage
77%
Expression
75.7%
Tests / Examples
76.7% / 32% ex
Functions
86 17 exported
Complexity
6.2 avg / 80 max
Call network
86 nodes / 73 edges
Call graph
Open call graph →Lowest coverage
86 functions| Function | Cyclo | Coverage |
|---|---|---|
| convert exp | 1 | 0% |
| EMstepBMidio | 6 | 0% |
| coef.dfm | 1 | 0% |
| convert.dfm | 4 | 0% |
| dfm_news_stationary_cov | 1 | 0% |
| logLik.dfm | 1 | 0% |
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| BM14_Models | data.frame | 101 × 8 | – |
People & History
11 releases. Pick two to compare their code metrics. R releases are shown for context.
- 1.0.1Latest
- RR 4.6.0 released · 2026-04-24
- 1.0.02026-01-26 · diff ↗
- 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
- 2.1 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet