# Statistics

## Step function regression in Stan

Introduction Tha 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 $$y_1, \ldots, y_n \in \mathbb{R}$$ sampled from a standard signal plus i.

Stein’s paradox Stein’s example, perhaps better known under the name Stein’s Paradox, is a well-known example in statistics that demonstrates the use of shrinkage to reduce the mean squared error ($$L_2$$-risk) of a multivariate estimator with respect to classical (unbiased) estimators, such as the maximum likelihood estimator.