Step functions

Step function regression in Stan

Introduction The aim of this post is to provide a working approach to perform piecewise constant or step function regression in Stan. To set up the regression problem, consider noisy observations y1,…,yn∈R sampled from a standard signal plus i.