Skip to content

dfms

Dynamic Factor Models

v1.0.1 · Jun 18, 2026 · GPL-3

Description

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>.

Downloads

CRAN

847

Last 30 days

3981st

1.8K

Last 90 days

8.5K

Last year

Trend: +79.1% (30d vs prior 30d)

r2u CRAN

37

Last 30 days

143

Last 90 days

514

Last year

Trend: -11.9% (30d vs prior 30d)

autoCRAN

1

Last 7 days

26

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

227

Last 30 days

286

Last 90 days

514

Last year

Trend: +467.5% (30d vs prior 30d)

CRAN Check Status

2 NOTE
11 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang NOTE
r-devel-linux-x86_64-fedora-gcc NOTE
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (2 non-OK)
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.

Check History

NOTE 10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 22, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.6Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.7Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.9Mb
ERROR 9 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
ERROR r-devel-windows-x86_64

whether package can be installed

Installation failed.
See 'd:/Rcompile/CRANpkg/local/4.6/dfms.Rcheck/00install.out' for details.
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.6Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.7Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.9Mb
NOTE 10 OK · 4 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-fedora-clang

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-devel-linux-x86_64-fedora-gcc

dependencies in R code

Namespace in Imports field not imported from: ‘Rcpp’
  All declared Imports should be used.
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.6Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.7Mb
  sub-directories of 1Mb or more:
    doc    2.3Mb
    libs   3.9Mb

Code

Structure

Lines of code

7,553

Files

64

Compiled share

8.1%

Has compiled src

Yes

Language breakdown

R 3,922 (51.9%)C/C++/src 614 (8.1%)Tests 666 (8.8%)Docs 1,433 (19%)Vignettes 918 (12.2%)

API

Exported functions

12

Internal functions

51

Recent export changes

v1.0.1+1 convert
v1.0.0+1 news

Testing & CI

Has tests

Yes

Test-to-code ratio

0.17

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

35.3%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

100%

Unsafe pattern score

0

Dep constraint coverage

100%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

GPL-3

License flags

SPDX valid, OSI approved

History

Versions

11

First release

2022-10-12

Latest release

2026-06-18

Avg cadence

93 days

Cold removal rate

Dep drift

0

LOC over versions

v0.1.3: 4,151 LOCv0.1.4: 4,159 LOCv0.2.0: 4,404 LOCv0.2.1: 4,404 LOCv0.2.2: 4,404 LOCv0.3.0: 5,051 LOCv0.3.1: 5,063 LOCv0.3.2: 5,087 LOCv0.4.0: 5,451 LOCv1.0.0: 6,778 LOCv1.0.1: 7,553 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies Rcpp collapse dfms

Version History

12 tracked
updated 1.0.1 ← 1.0.0 diff Jun 18, 2026
new 1.0.0 Mar 10, 2026
updated 1.0.0 ← 0.4.0 diff Jan 25, 2026
updated 0.4.0 ← 0.3.2 diff Jan 17, 2026
updated 0.3.2 ← 0.3.1 diff Sep 23, 2025
updated 0.3.1 ← 0.3.0 diff Aug 19, 2025
updated 0.3.0 ← 0.2.2 diff May 17, 2025
updated 0.2.2 ← 0.2.1 diff Jun 8, 2024
updated 0.2.1 ← 0.2.0 diff Apr 2, 2023
updated 0.2.0 ← 0.1.4 diff Mar 30, 2023
updated 0.1.4 ← 0.1.3 diff Jan 11, 2023
new 0.1.3 Oct 11, 2022