Hierarchical Piecewise Regression with Smoothed Change-Points

Fits Bayesian hierarchical piecewise regression models with multiple logistic-smoothed change-points. Non-linear parameters (change-point locations and transition sharpness) and linear parameters can each be conditioned on covariates and factors via flexible design matrices. A random-intercept structure is supported for any parameter. Spike-and-slab regularization is supported for selecting the number of breakpoints. Posterior inference uses a Metropolis-within-Gibbs sampler implemented in 'Rust' for speed. Methods are based on the smooth transition piecewise regression model of Bacon and Watts (1971) and variable selection spike-and-slab priors of Kuo and Mallick (1998) < https://www.jstor.org/stable/25053023>. Methods are described in Bindoff (2026) .


smoothbp

Fits smoothed hierarchical piecewise regression with multiple change-points using an optimised Metropolis-within-Gibbs sampler implemented in Rust.

Features

  • Multi-Breakpoint Models: Support for an arbitrary number of change-points.
  • Spike-and-Slab Regularization: Automatic selection of the number of breakpoints using smoothbp_ss().
  • Flexible Predictors: Change-point locations (omega), slope changes (delta), and transition sharpness (rho) can all be conditioned on covariates.
  • Hierarchical Structure: Random intercepts for all parameters.
  • High Performance: Core MCMC engine written in Rust.

Installation

# Requires Rtools45 on Windows for Rust compilation
pak::pkg_install("ABindoff/smoothbp")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("smoothbp")

0.2.8 by Aidan D Bindoff, a month ago


https://github.com/ABindoff/smoothbp, https://doi.org/10.48550/arXiv.2606.19044


Report a bug at https://github.com/ABindoff/smoothbp/issues


Browse source code at https://github.com/cran/smoothbp


Authors: Aidan D Bindoff [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports posterior, ggplot2, stats, bridgesampling, loo, bayesplot

Suggests testthat, withr, knitr, rmarkdown, brms, mcp, dplyr, gt, tidyr, scales, rjags

System requirements: Cargo (Rust's package manager), rustc >= 1.65.0


Suggested by fibr.


See at CRAN