📦 New package: BayesianDisaggregation – Coherent structure transfer through uncertain proxies to disaggregation

The BayesianDisaggregation package solves a fundamental problem in data analysis: how to coherently project structure from disaggregated spaces onto aggregated data through uncertain intermediaries. The central idea is to relate information at incompatible levels of granularity when the only available mapping is an imperfect proxy, incorporating this uncertainty honestly and propagating it through to the final disaggregation.

In practical terms, you often encounter data at different resolutions that need to be related: aggregated data (like Consumer Price Index at national level), disaggregated data (like economic gains by sector), and an imperfect proxy for disaggregation (like Gross Value Added by sector). The challenge is: How do you decompose the aggregate using structure from the disaggregated data when your mapping is uncertain?

The main functionality of BayesianDisaggregation includes:

  • Extracting likelihood signals from prior disaggregation weights via PCA/SVD to capture temporal patterns

  • Performing analytical Bayesian updating to transform prior weights into posterior weights that incorporate uncertainty

  • Multiple update rules (weighted, multiplicative, Dirichlet, adaptive) tailored for different use cases

  • Comprehensive validation through coherence, stability, and interpretability metrics

  • MCMC-free analytical solutions that avoid computational overhead while providing formal uncertainty quantification

For example, the complete pipeline can disaggregate Consumer Price Index by economic sectors:


library(BayesianDisaggregation)

# Run complete disaggregation pipeline

results <- bayesian_disaggregate(

path_cpi = "path/to/cpi.xlsx",

path_weights = "path/to/weights.xlsx",

method = "adaptive",

likelihood_pattern = "recent"

)

# Access disaggregated CPI by sector

disaggregated_cpi <- results$posterior

metrics <- results$metrics

This breakthrough enables analyses that were previously impossible: Which sectors are truly driving inflation? How do price shocks differentially affect industries? These are questions policymakers desperately need answered but couldn't address with existing tools, since no traditional methods exist for disaggregating CPI by economic sector due to the inherently uncertain mapping between consumer prices and productive sectors.

The framework generalizes beyond economics to any domain with the structure transfer problem: neuroscience (relating global brain activity to specific cognitive functions), climate science (distributing global projections to regional levels), epidemiology (allocating national rates to subpopulations), and machine learning (domain adaptation through noisy representations).

The BayesianDisaggregation package is available on GitHub: IsadoreNabi/BayesianDisaggregation. It's easily installed with:


devtools::install_github("IsadoreNabi/BayesianDisaggregation")

You'll find detailed explanations and real-world applications in my Philosophy of Statistics blog posts (English and Spanish versions).

There I explain the theoretical foundations and demonstrate applications in econometrics, with potential extensions to other fields. By providing the first principled method for CPI disaggregation, this package opens new analytical frontiers for central banks, researchers, and policymakers. I hope you'll try it and let me know what you think!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.