dsp: Dynamic Shrinkage Process and Change Point Detection

Provides efficient Markov chain Monte Carlo (MCMC) algorithms for dynamic shrinkage processes, which extend global-local shrinkage priors to the time series setting by allowing shrinkage to depend on its own past. These priors yield locally adaptive estimates, useful for time series and regression functions with irregular features. The package includes full MCMC implementations for trend filtering using dynamic shrinkage on signal differences, producing locally constant or linear fits with adaptive credible bands. Also included are models with static shrinkage and normal-inverse-Gamma priors for comparison. Additional tools cover dynamic regression with time-varying coefficients and B-spline models with shrinkage on basis differences, allowing for flexible curve-fitting with unequally spaced data. Some support for heteroscedastic errors, outlier detection, and change point estimation. Methods in this package are described in Kowal et al. (2019) <doi:10.1111/rssb.12325>, Wu et al. (2024) <doi:10.1080/07350015.2024.2362269>, Schafer and Matteson (2024) <doi:10.1080/00401706.2024.2407316>, and Cho and Matteson (2024) <doi:10.48550/arXiv.2408.11315>.

Package details

AuthorDaniel R. Kowal [aut, cph], Haoxuan Wu [aut], Toryn Schafer [aut, cre] (ORCID: <https://orcid.org/0000-0001-5594-7697>), Jason B. Cho [aut], David S. Matteson [aut]
MaintainerToryn Schafer <toryn27@gmail.com>
LicenseGPL (>= 3)
Version1.2.0
URL https://github.com/schafert/dsp
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("dsp")

Try the dsp package in your browser

Any scripts or data that you put into this service are public.

dsp documentation built on Aug. 21, 2025, 5:29 p.m.