Skip to content

dfms

1.0.1

Dynamic Factor Models

0packages depend
8.4Kdownloads / year
76.7%test coverage
11/13checks pass

Overview

About
Maintained by Sebastian KrantzFirst published 2022-10-1211 releasesCRAN page ↗GitHub ↗

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

CRAN checks
2NOTE11OK
Failing flavors
  • NOTE r-devel-linux-x86_64-fedora-clang
  • NOTE r-devel-linux-x86_64-fedora-gcc
Slowest check: 4.2 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.17
76.7%
Coverage · measured lines
100%
Documentation · exports
2
Dependencies · direct
Check history
  • NOTE2026-04-22
    10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    9 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • NOTE2026-03-10
    10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 614 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
65%
Documented parameters
92%
Return-value docs
100%
References docs
39%

Downloads

8.4K
CRAN downloads in the past year
Rank #4,891 · ~23/day · ~701/mo
Daily download trend is not available in this view yet.
70530 days
1.9K90 days
8.4K1 year
Compare downloads with other packages →
Also on514 r2u28 autocran514 conda_forge59 c2d4u

Repository

Repository
44Stars
10Forks
1Open issues
2Open PRs
11Releases
589Commits
2Contributors
dynamic-factor-modelsrstatstime-series
License GPL-3.0 · 589 commits · Last activity 2026-06-18 · 0% stars, 30d

Stars over time

2025-06-20 · 352026-07-07 · 44

Repository practices

Upstream repositoryBeta

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.

Continuous integration (1)
GitHub Actions
Research and citation (1)
codemeta.json
Lint, format, editor (1)
RStudio project
Coverage (1)
Codecov
Show all practices
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1.0
Imports (2)
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 4,588 (61%)Rd 1,433 (19%)Vignettes 620 (8%)C++ 599 (8%)Other 298 (4%)C 15 (0%)
Code characteristics
Object systems
S325
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

Loading call graph…

Lowest coverage

86 functions
FunctionCycloCoverage
convert exp10%
EMstepBMidio60%
coef.dfm10%
convert.dfm40%
dfm_news_stationary_cov10%
logLik.dfm10%

Datasets

Bundled datasets · 1
NameClassRows × ColsAlso ships in
BM14_Modelsdata.frame101 × 8

People & History

People (5)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Contributors (1)
Contributor · added in 1.0.1
Reviewers (2)
Reviewer · added in 0.3.0
Reviewer · added in 0.3.0
Package Timeline

11 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.0.1Latest
    2026-06-19 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.0
    2026-01-26 · diff ↗
  • 0.4.0
    2026-01-18 · diff ↗
  • 0.3.2
    2025-09-24 · diff ↗
  • 0.3.1
    2025-08-20 · diff ↗
  • 0.3.0
    2025-05-18 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.2.2
    2024-06-09 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.1
    2023-04-03 · diff ↗
  • 0.2.0
    2023-03-31 · diff ↗
  • 0.1.4
    2023-01-12 · diff ↗
  • 0.1.3
    2022-10-12
  • R
    R 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
Appears in task views
Report a problem with this page →