dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process
summary
The gist
dsp provides a unified state-space framework for modeling nonstationary time series using the Dynamic Shrinkage Process (DSP)…
In short
The dsp package introduces a Dynamic Shrinkage Process (DSP) framework for modeling nonstationary time series using global-local shrinkage priors. It provides a unified interface for specifying, computing posteriors, and visualizing models like trend filtering and changepoint detection. This allows researchers to handle complex time series data flexibly.
Key concepts
- Dynamic Shrinkage Process (DSP)
- DSP is a hierarchical model where the local scale parameter follows an autoregressive process. It incorporates time dependence between local terms, allowing the model to dynamically adjust regularization over time based on data characteristics.
- Local Term [ωt | vt]
- This term represents the local component of the time series at time t, conditional on a latent variable vt. It is defined independently from other local terms and follows a normal distribution whose variance depends on vt.
- Unified Framework
- The package offers a common interface for various models, including trend filtering, changepoint detection, and time-varying parameter regression. This means users can switch between different modeling tasks within the same software structure.
- Posterior Predictive Draws
- The package generates full posterior predictive draws at every observation time. These draws are essential tools for downstream applications like missing-value imputation and forecasting by leveraging the entire distribution of possible outcomes.
Terminology used across episodes
This episode discusses
- dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process · Paper Radio
The paper
dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process · Read on arXiv
Jason B. Cho, Daniel R. Kowal, Haoxuan Wu, David S. Matteson, Toryn L J Schafer
Cornell University · Headlands Technologies LLC
dsp provides a unified state-space framework for modeling nonstationary time series using the Dynamic Shrinkage Process (DSP), a class of global-local shrinkage priors. DSP adaptively regularizes time-varying parameters to shrink noise while preserving abrupt changes and other local structure. The package supports Gaussian and count-data smoothing, changepoint detection, time-varying parameter regression, and volatility estimation, with posterior predictive draws available for missing-value imputation and forecasting. Nonstationary time series often contain periods of relative stability punctuated by abrupt changes in mean or variance. dsp offers a common interface for model specification, posterior computation, summarization, and visualization across models that were previously developed separately in the literature. Core functionality is implemented in C++ via Rcpp for computational efficiency. We describe the underlying models, package design, and the main functions for fitting, summarizing, and plotting posterior results.
Transcript
Introduction to the show: ident: Statistics. The day in statistics: methods, theory and the inference under them.
Tom: We're looking at the paper: "dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process".
Jane: Here's the gist of the paper. dsp provides a unified state-space framework for modeling nonstationary time series using the Dynamic Shrinkage Process (DSP), a class of global-local shrinkage priors This package offers a common interface for model specification, posterior computation, summarization, and visualization across models that were previously developed separately in the literature Core Methodology The DSP is defined by a hierarchical form where the local scale parameter follows an autoregressive process.
Tom: The local term is defined as
ωt vt: indep ∼ N(0, exp(vt)).
Jane: The local parameter ηt follows a Z-distribution parameterized as Z(α, β, mz, σz).
Tom: The distinctive feature of DSP is its incorporation of time dependence between the local terms, ψt.
Title and authors: Tom: So we're talking about the title "dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process" and who came up with it. We already touched on what DSP is, but let's focus on what this specific package does.
Jane: It was written by Jason B. Cho and Daniel R. Kowal from Cornell University, so they’re the ones driving this unified framework for modeling nonstationary time series using the Dynamic Shrinkage Process or DSP >
Lu: What I see is that it consolidates a lot of prior work on DSP-based Bayesian time series models into a single, coherent programmatic framework which simplifies how researchers can use these models >
Meng: It’s an R package, and they implemented the core functionality in C++ via Rcpp for computational efficiency, which is important because we’re dealing with large datasets and we need fast posterior computation >
Lalam: This means performance-critical components are implemented in C++ via Rcpp, enabling fast posterior computation and scalability to large data sets >
Tom: So the package offers a consistent interface for specifying models, running MCMC-based inference, and summarizing and visualizing results across trend filtering, changepoint detection, and volatility modeling >
Jane: It’s really about providing that common interface so researchers can easily switch between those different applications within a single software package >
The paper's summary: Tom: Let's look at the core summary of this work. The paper states that DSP adaptively regularizes time-varying parameters to shrink noise while preserving abrupt changes and other local structure in the time series >
Jane: It points out that nonstationary time series often have periods of relative stability punctuated by abrupt changes in mean or variance, which is exactly what this modeling approach is designed to handle >
Lu: The methodology involves a hierarchical form where the local scale parameter follows an autoregressive process, and the local term is defined as omega t vt indep ∼ N(zero exp(vt)] >
Meng: That structure means the local log-scales follow an autoregressive process rather than being independent, which compounds a difficulty because the funnel recurs at each time point and the scales are series dependent >
Lalam: The distinctive feature of DSP is incorporating time dependence between those local terms, psi t, allowing the model to dynamically adjust the degree of regularization over time >
Tom: So in short, it’s this unified state-space framework that gives us global-local shrinkage priors that adaptively regularize parameters based on their local structure and temporal dependencies >
Jane: And because of this, it supports Gaussian and count-data smoothing, changepoint detection, time-varying parameter regression, and volatility estimation with posterior predictive draws available for missing-value imputation and forecasting >
The paper's improvements: Tom: The authors discuss some specific improvements they made to the existing DSP models. They mention things like adapting the regularization strategy dynamically based on whether the data is Gaussian or count data >
Lu: They suggest that adaptive regularization in high-dimensional models can be achieved by combining a single global parameter controlling overall shrinkage with local scale parameters, which reduces noise while preserving sharp local structures in the signal >
Meng: That sounds useful because it means we can potentially adapt our regularization strategy dynamically based on the characteristics of the data, whether it's Gaussian or count data >
Lalam: They also improved changepoint detection by using models like ABCO that decompose the observed series into three components: a local mean mu t, a sparse additive outlier signal zeta t, and a heteroskedastic noise term epsilon t >
Jane: That decomposition is interesting because it allows AI systems to accurately identify abrupt shifts in mean behavior while simultaneously accounting for isolated outliers and time-varying volatility >
Conclusion: Tom: So wrapping up this paper on "dsp: An R Package for Bayesian Time Series Modeling with the Dynamic Shrinkage Process". The main implication is that we now have a single, flexible, and computationally efficient framework to model nonstationary time series across several important applications >
Jane: It gives us a consistent interface for specifying models, running MCMC-based inference, and summarizing results for things like trend estimation and volatility modeling >
Lu: The authors point out that the geometry of the posterior is generally unsuitable as written for Hamiltonian Monte Carlo samplers like Stan because global-local shrinkage priors induce a funnel-shaped posterior >
Meng: That's a big caveat. It means we can't just throw this into standard gradient-based samplers, which is something I need to keep in mind when planning deployment >
Lalam: They also provided tools for posterior predictive draws at every observation time, so missing-value imputation and forecasting are available directly from the MCMC output >
Tom: So it’s a powerful tool for analyzing complex data where we expect things to change abruptly over time, but we need to be careful about which sampling methods we use for inference >
Jane: Exactly. This paper on the dsp package provides us with a unified way to handle these kinds of nonstationary challenges, and it sets the stage for how AI can better model dynamic systems that shift over time.
More episodes
- Daily Summary for 2026-11-19
- 2310.07973-Statistical Performance Guarantee for Subgroup Identification with Generic Machine Learning
- 2408.09155-Learning Robust Treatment Rules for Censored Data
- Daily Summary for 2026-11-19
- 2603.23397-Kinetic Langevin Splitting Schemes for Constrained Sampling
- 2606.09906-An information-geometric framework for mapping maximum potential biodiversity
- 2603.27718-Induced replication and the assessment of models
- 1307.0898-Entropy of a Zipfian Distributed Lexicon
- 2406.19974-Generalizing self-normalized importance sampling with couplings
- 2412.10213-Collaborative Optimal Design of Controlled Experiments with Subject Covariates