convergenceDFM

convergenceDFM is an R package for convergence analysis in macro-financial panels, combining Dynamic Factor Models (DFM) with mean-reverting Ornstein-Uhlenbeck (OU) processes.

Main Features

Installation

From CRAN

install.packages("convergenceDFM")

Development version (GitHub)

# install.packages("devtools")
devtools::install_github("your-username/convergenceDFM")

Optional dependency: cmdstanr

For advanced Bayesian features (optional), install cmdstanr:

install.packages("cmdstanr", 
                 repos = c("https://stan-dev.r-universe.dev", 
                          getOption("repos")))

Note: cmdstanr is not on CRAN and must be installed from the Stan repository. The main functionalities of the package do not require cmdstanr.

Basic Usage

library(convergenceDFM)

# Basic example (adjust according to your main functions)
# data <- prepare_panel_data(your_data)
# dfm_result <- estimate_dfm(data)
# ou_result <- estimate_ou_process(dfm_result)
# plot_convergence(ou_result)

For more examples, see the vignettes:

browseVignettes("convergenceDFM")

Package Structure

convergenceDFM/
├── R/                  # Source code
├── data/               # Package datasets
├── inst/               # Additional package files
├── man/                # Documentation (auto-generated by roxygen2)
├── tests/              # Tests with testthat (edition 3)
├── vignettes/          # Vignettes and tutorials
├── DESCRIPTION         # Package metadata
├── LICENSE             # License file
├── NAMESPACE           # Package namespace (auto-generated)
├── NEWS.md             # Changelog
└── README.md           # This file

Development

References

The package implements methods from:

License

This package is free and open source software, licensed under GPL-3.

Author

José Mauricio Gómez Julián
Email: isadorenabi@pm.me