← Back to all sparks
D

dfms

ANALYTICS
Velocity0.0

Dynamic Factor Models for R. Contribute to ropensci/dfms development by creating an account on GitHub.

Peer-reviewed, feature-complete, and now able to hand its models to other forecasting engines.

nowcastingstate-space-modelseconometricsropensciinteroperability
Current state
dfms estimates dynamic factor models in R, the workhorse for nowcasting economic activity from ragged, mixed-frequency data. The package worked through the Banbura and Modugno (2014) specification in stages — quarterly variables in 0.3.0, AR(1) idiosyncratic errors combined with mixed frequency in 0.4.0 — then declared 1.0.0 feature-complete on completing rOpenSci peer review, adding news decomposition to attribute forecast revisions to specific data releases. Version 1.0.1 adds convert(), which exports fitted models to dlm or KFAS state-space objects.
Where it's heading
The package has finished the implementation programme it set out in its 2023 vignette and is now working on the edges: interoperability with other state-space packages rather than more estimation methods of its own. The convert() function is the clearest signal — instead of implementing smoothing and prediction intervals natively, it hands the model to packages that already have them. The rOpenSci move also puts it on a review-backed, documented footing that research users can cite.
Prediction
Expect continued interoperability and diagnostic work rather than new estimators, since the maintainer has explicitly scoped the package as complete. Bug fixes against RcppArmadillo releases will likely remain the other recurring driver.

Recent moves

  1. 1mo ago

    convert() exports models to dlm and KFAS state-space objects

    A characteristic post-1.0 move: rather than implement smoothing and prediction intervals natively, convert() hands fitted models to dlm or KFAS and lets those packages do it. It fits the pattern of a package that considers its own scope closed and is now working on what connects to it.

    View source ↗
  2. 6mo ago

    1.0: rOpenSci review passed, news decomposition added

    ⚡ SPARK

    The release that closes the implementation programme the package announced in 2023 and adds the one capability that changes what users can ask of it — attributing forecast revisions to individual data releases. Everything after this has been interoperability rather than estimation.

    View source ↗
  3. 6mo ago

    Mixed-frequency estimation gains AR(1) idiosyncratic errors

    Combines the quarterly-variable support from 0.3.0 with AR(1) observation errors, completing the full Banbura and Modugno specification the package had been building toward incrementally. New EM-step internals handle the combined case, and residual plotting was updated to match.

    View source ↗
  4. 9mo ago

    C++ compatibility with RcppArmadillo 15.0.2

    Internal C++ adjustments to track an RcppArmadillo release. No user-visible change, and a recurring maintenance driver for a package with a compiled Kalman filter at its core.

    View source ↗
  5. 1y ago

    Fixes estimation with a single quarterly variable

    A user-reported edge case in the mixed-frequency code path added two releases earlier. Narrow fix, no behavioural change for other configurations.

    View source ↗
  6. 1y ago

    Adds mixed-frequency estimation via quarterly.vars

    The first half of the mixed-frequency work: monthly and quarterly series can be estimated together with temporal aggregation constraints. This is the capability that makes the package usable for real nowcasting, where the target is quarterly and the indicators are not.

    View source ↗