Skip to content

Dynamic Factor Models

0packages depend
7.8Kdownloads / year
76.7%test coverage
11/13flavors OK

Overview

About

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.

Changes in 1.0.1
  • New function convert() to export dfm objects to dlm or KFAS state-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

CRAN checks
2NOTE11OK
Check messages
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.

CRAN check page ↗

Slowest check: 4.6 min · r-devel-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTENow
  • NOTE10 OK, 4 NOTE2026-04-22
  • ERROR9 OK, 4 NOTE, 1 ERROR2026-04-18
  • NOTE10 OK, 4 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.0.1
READMEYes · 614 wordsVignettesYes · 2 · staticNEWSYes · 100% structured · mentions 1.0.1Citation fileNoWebsiteYes · pkgdown
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

7.8K
CRAN downloads in the past year
Rank #4,465 · ~21/day · ~648/mo
Daily download trend is not available in this view yet.
75230 days
1.9K90 days
7.8K1 year
Compare downloads with other packages →
Also on478 r2u7 autocran861 conda_forge117 c2d4u

Repository

48Stars
10Forks
1Open issues
2Open PRs
11Releases
589Commits
2Commit identities
dynamic-factor-modelsrstatstime-series
License file reads as GPL-3.0 · 589 commits · Last activity 2026-06-18 · +2.1% stars, 30d
Responsiveness
How these are sampled
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

2025-07-23 · 362026-09-27 · 48
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conduct (inherited from ropensci)Contributing guide
Docs source (2)
pkgdown

GitHub Pages site last deployed 2026-01-22

pkgdown site last built 2026-01-22, before release 1.0.1 (2026-06-18)

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
Research and citation (1)
codemeta.json
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-01-22
    Named in .Rbuildignore: .claude
    Pull request it wrote: opened by a project member
  • Cursorfirst seen 2026-01-22
    Named in .Rbuildignore: .cursor
    Commits: at least 1 crediting it in the message
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 4.1.0
Imports (2)
LinkingTo (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (5)
Author, Maintainer since 0.1.3 (2022)
Contributor · added in 1.0.1
Reviewer · added in 0.3.0
Reviewer · added in 0.3.0
Releases (11)

Pick two releases to compare their code metrics.

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
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("dfms")
Krantz, S., Bagdziunas, R., Holmes, E., Klettner, C., & Tikka, S. (2026). dfms: Dynamic Factor Models (Version 1.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for dfms version 1.0.1 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy